diff --git a/src/bridge/RippleJSBridge.js b/src/bridge/RippleJSBridge.js index e3531790..952fdaf9 100644 --- a/src/bridge/RippleJSBridge.js +++ b/src/bridge/RippleJSBridge.js @@ -463,10 +463,30 @@ const RippleJSBridge: WalletBridge = { getTransactionAmount: (a, t) => t.amount, - editTransactionRecipient: (account, t, recipient) => ({ - ...t, - recipient, - }), + editTransactionRecipient: (account, t, recipient) => { + const parts = recipient.split('?') + const params = new URLSearchParams(parts[1]) + recipient = parts[0] + + // Extract parameters we may need + for (const [key, value] of params.entries()) { + switch (key) { + case 'dt': + t.tag = parseInt(value, 10) || 0 + break + case 'amount': + t.amount = parseAPIValue(value || '0') + break + default: + // do nothing + } + } + + return { + ...t, + recipient, + } + }, EditFees, diff --git a/src/components/AdvancedOptions/RippleKind.js b/src/components/AdvancedOptions/RippleKind.js index 74b0b5a4..ff34faa7 100644 --- a/src/components/AdvancedOptions/RippleKind.js +++ b/src/components/AdvancedOptions/RippleKind.js @@ -6,7 +6,6 @@ import { translate } from 'react-i18next' import Box from 'components/base/Box' import Input from 'components/base/Input' import Label from 'components/base/Label' -import Spoiler from 'components/base/Spoiler' type Props = { tag: ?number, @@ -31,18 +30,14 @@ class RippleKind extends Component { render() { const { tag, t } = this.props return ( - - - - - - - - + + + + - + ) } }