mirror of
https://github.com/trezor/trezor-wallet
synced 2024-11-28 03:08:30 +00:00
Ripple destinationTag as optional param
This commit is contained in:
parent
75cfd44b3c
commit
b5701cd8ae
@ -279,7 +279,13 @@ export const onSend = (): AsyncAction => async (dispatch: Dispatch, getState: Ge
|
|||||||
if (!blockchain) return;
|
if (!blockchain) return;
|
||||||
|
|
||||||
const currentState: State = getState().sendFormRipple;
|
const currentState: State = getState().sendFormRipple;
|
||||||
const amount = fromDecimalAmount(currentState.amount, 6);
|
const payment: { amount: string, destination: string, destinationTag?: number } = {
|
||||||
|
amount: fromDecimalAmount(currentState.amount, network.decimals),
|
||||||
|
destination: currentState.address,
|
||||||
|
};
|
||||||
|
if (currentState.destinationTag.length > 0) {
|
||||||
|
payment.destinationTag = parseInt(currentState.destinationTag, 10);
|
||||||
|
}
|
||||||
|
|
||||||
const signedTransaction = await TrezorConnect.rippleSignTransaction({
|
const signedTransaction = await TrezorConnect.rippleSignTransaction({
|
||||||
device: {
|
device: {
|
||||||
@ -293,11 +299,7 @@ export const onSend = (): AsyncAction => async (dispatch: Dispatch, getState: Ge
|
|||||||
fee: currentState.selectedFeeLevel.fee, // Fee must be in the range of 10 to 10,000 drops
|
fee: currentState.selectedFeeLevel.fee, // Fee must be in the range of 10 to 10,000 drops
|
||||||
flags: 0x80000000,
|
flags: 0x80000000,
|
||||||
sequence: account.sequence,
|
sequence: account.sequence,
|
||||||
payment: {
|
payment,
|
||||||
amount,
|
|
||||||
destination: currentState.address,
|
|
||||||
destinationTag: currentState.destinationTag.length ? parseInt(currentState.destinationTag, 10) : undefined,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user