Use balances.transferAll as available & applicable (#6399)
* Use balances.transferAll as available & applicable * Adjust with only ?:
This commit is contained in:
parent
26527e5b7e
commit
c6e239b9f9
@ -213,10 +213,18 @@ function Transfer ({ className = '', onClose, recipientId: propRecipientId, send
|
||||
onStart={onClose}
|
||||
params={
|
||||
canToggleAll && isAll
|
||||
? [propRecipientId || recipientId, maxTransfer]
|
||||
? isFunction(api.tx.balances.transferAll)
|
||||
? [propRecipientId || recipientId, false]
|
||||
: [propRecipientId || recipientId, maxTransfer]
|
||||
: [propRecipientId || recipientId, amount]
|
||||
}
|
||||
tx={(isProtected && api.tx.balances.transferKeepAlive) || api.tx.balances.transfer}
|
||||
tx={
|
||||
canToggleAll && isAll && isFunction(api.tx.balances.transferAll)
|
||||
? api.tx.balances.transferAll
|
||||
: isProtected
|
||||
? api.tx.balances.transferKeepAlive
|
||||
: api.tx.balances.transfer
|
||||
}
|
||||
/>
|
||||
</Modal.Actions>
|
||||
</Modal>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user