diff --git a/packages/blockchain-link-types/src/common.ts b/packages/blockchain-link-types/src/common.ts index f16bd3c62402..e4fe099788c5 100644 --- a/packages/blockchain-link-types/src/common.ts +++ b/packages/blockchain-link-types/src/common.ts @@ -157,6 +157,9 @@ export interface Transaction { details: TransactionDetail; vsize?: number; feeRate?: string; + rippleSpecific?: { + destinationTag?: number; + }; } /* Account */ diff --git a/packages/blockchain-link-utils/src/ripple.ts b/packages/blockchain-link-utils/src/ripple.ts index 2129f3cbb081..db4f9b853515 100644 --- a/packages/blockchain-link-utils/src/ripple.ts +++ b/packages/blockchain-link-utils/src/ripple.ts @@ -25,6 +25,7 @@ export const transformTransaction = (tx: any, descriptor?: string): Transaction const addresses = [tx.Destination]; const amount = tx.Amount; const fee = tx.Fee; + const destinationTag = tx.DestinationTag; // TODO: https://github.com/ripple/ripple-lib/blob/develop/docs/index.md#transaction-types return { @@ -56,5 +57,8 @@ export const transformTransaction = (tx: any, descriptor?: string): Transaction totalInput: '0', totalOutput: '0', }, + rippleSpecific: { + destinationTag, + }, }; }; diff --git a/packages/blockchain-link/tests/unit/fixtures/notifications-ripple.ts b/packages/blockchain-link/tests/unit/fixtures/notifications-ripple.ts index cc9db922c5a3..1327252ec565 100644 --- a/packages/blockchain-link/tests/unit/fixtures/notifications-ripple.ts +++ b/packages/blockchain-link/tests/unit/fixtures/notifications-ripple.ts @@ -119,6 +119,7 @@ const notifyAddresses = [ ...tx, type: 'sent', targets: [{ addresses: ['B'], isAddress: true, n: 0 }], + rippleSpecific: { destinationTag: undefined }, }, }, }, @@ -145,6 +146,7 @@ const notifyAddresses = [ ...tx, type: 'recv', targets: [{ addresses: ['A'], isAddress: true, n: 0 }], + rippleSpecific: { destinationTag: undefined }, }, }, }, @@ -187,6 +189,7 @@ const notifyAddresses = [ ...tx, type: 'sent', targets: [{ addresses: ['B'], isAddress: true, n: 0 }], + rippleSpecific: { destinationTag: undefined }, }, }, }, @@ -213,6 +216,7 @@ const notifyAddresses = [ ...tx, type: 'recv', targets: [{ addresses: ['C'], isAddress: true, n: 0 }], + rippleSpecific: { destinationTag: undefined }, }, }, }, diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/BasicTxDetails.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/BasicTxDetails.tsx index ce407ab5b443..50780f77d9d7 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/BasicTxDetails.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/BasicTxDetails.tsx @@ -178,6 +178,12 @@ export const BasicTxDetails = ({ )} + + {tx.rippleSpecific && ( + } iconName="tag"> + {tx.rippleSpecific.destinationTag ?? '-'} + + )} ); diff --git a/packages/suite/src/support/messages.ts b/packages/suite/src/support/messages.ts index fead8ba853b3..7e51d3f17626 100644 --- a/packages/suite/src/support/messages.ts +++ b/packages/suite/src/support/messages.ts @@ -5462,6 +5462,10 @@ export default defineMessages({ defaultMessage: 'Destination tag', id: 'DESTINATION_TAG', }, + DESTINATION_TAG_SHORT: { + defaultMessage: 'Memo/Tag', + id: 'DESTINATION_TAG_SHORT', + }, DESTINATION_TAG_TOOLTIP: { id: 'DESTINATION_TAG_TOOLTIP', defaultMessage: