From 8ada3695c7e85fb72ef8d668c871c089f7ea20ba Mon Sep 17 00:00:00 2001 From: banklesss Date: Tue, 10 Dec 2024 13:16:17 +0100 Subject: [PATCH] fix(wallet-mobile): tx history actions banner receive address copied feedback --- .../features/Transactions/common/strings.tsx | 5 + .../useCases/TxHistory/ActionsBanner.tsx | 2 +- .../src/kernel/i18n/locales/en-US.json | 2 +- .../features/Transactions/common/strings.json | 287 +++++++++--------- 4 files changed, 158 insertions(+), 138 deletions(-) diff --git a/apps/wallet-mobile/src/features/Transactions/common/strings.tsx b/apps/wallet-mobile/src/features/Transactions/common/strings.tsx index ad976996c0..bdffa9345d 100644 --- a/apps/wallet-mobile/src/features/Transactions/common/strings.tsx +++ b/apps/wallet-mobile/src/features/Transactions/common/strings.tsx @@ -51,6 +51,7 @@ export const useStrings = () => { SELF: intl.formatMessage(txTypeMessages.SELF), MULTI: intl.formatMessage(txTypeMessages.MULTI), assetsLabel: intl.formatMessage(globalMessages.assetsLabel), + copiedLabel: intl.formatMessage(messages.copiedLabel), } } @@ -179,6 +180,10 @@ export const messages = defineMessages({ id: 'components.receive.addressmodal.copyLabel', defaultMessage: '!!!Copy address', }, + copiedLabel: { + id: 'components.receive.addressmodal.copiedLabel', + defaultMessage: '!!!Address Copied', + }, spending: { id: 'components.receive.addressmodal.spendingKeyHash', defaultMessage: '!!!Spending', diff --git a/apps/wallet-mobile/src/features/Transactions/useCases/TxHistory/ActionsBanner.tsx b/apps/wallet-mobile/src/features/Transactions/useCases/TxHistory/ActionsBanner.tsx index 8cdc08ccc8..8a06da5233 100644 --- a/apps/wallet-mobile/src/features/Transactions/useCases/TxHistory/ActionsBanner.tsx +++ b/apps/wallet-mobile/src/features/Transactions/useCases/TxHistory/ActionsBanner.tsx @@ -98,7 +98,7 @@ export const ActionsBanner = ({disabled = false}: {disabled: boolean}) => { const handleOnLongPressReceive = (event: GestureResponderEvent) => { track.receiveCopyAddressClicked({copy_address_location: 'Long Press wallet Address'}) - copy({text: nextReceiveAddress, event}) + copy({text: nextReceiveAddress, event, feedback: strings.copiedLabel}) } return ( diff --git a/apps/wallet-mobile/src/kernel/i18n/locales/en-US.json b/apps/wallet-mobile/src/kernel/i18n/locales/en-US.json index f5eae1b829..62e850c0ec 100644 --- a/apps/wallet-mobile/src/kernel/i18n/locales/en-US.json +++ b/apps/wallet-mobile/src/kernel/i18n/locales/en-US.json @@ -236,7 +236,7 @@ "components.pooltransition.updateKeepEarning": "Update now and keep earning", "components.pooltransition.update": "Update pool", "components.receive.addressmodal.BIP32path": "Derivation path", - "components.receive.addressmodal.copiedLabel": "Copied", + "components.receive.addressmodal.copiedLabel": "Address Copied", "components.receive.addressmodal.copyLabel": "Copy address", "components.receive.addressmodal.spendingKeyHash": "Spending key hash", "components.receive.addressmodal.stakingKeyHash": "Staking key hash", diff --git a/apps/wallet-mobile/translations/messages/src/features/Transactions/common/strings.json b/apps/wallet-mobile/translations/messages/src/features/Transactions/common/strings.json index 0d8d4cdf88..e433e6d0d6 100644 --- a/apps/wallet-mobile/translations/messages/src/features/Transactions/common/strings.json +++ b/apps/wallet-mobile/translations/messages/src/features/Transactions/common/strings.json @@ -4,14 +4,14 @@ "defaultMessage": "!!!Sent funds", "file": "src/features/Transactions/common/strings.tsx", "start": { - "line": 58, + "line": 59, "column": 8, - "index": 3217 + "index": 3276 }, "end": { - "line": 61, + "line": 62, "column": 3, - "index": 3312 + "index": 3371 } }, { @@ -19,14 +19,14 @@ "defaultMessage": "!!!Received funds", "file": "src/features/Transactions/common/strings.tsx", "start": { - "line": 62, + "line": 63, "column": 12, - "index": 3326 + "index": 3385 }, "end": { - "line": 65, + "line": 66, "column": 3, - "index": 3429 + "index": 3488 } }, { @@ -34,14 +34,14 @@ "defaultMessage": "!!!Intrawallet transaction", "file": "src/features/Transactions/common/strings.tsx", "start": { - "line": 66, + "line": 67, "column": 8, - "index": 3439 + "index": 3498 }, "end": { - "line": 69, + "line": 70, "column": 3, - "index": 3547 + "index": 3606 } }, { @@ -49,14 +49,14 @@ "defaultMessage": "!!!Multi-party transaction", "file": "src/features/Transactions/common/strings.tsx", "start": { - "line": 70, + "line": 71, "column": 9, - "index": 3558 + "index": 3617 }, "end": { - "line": 73, + "line": 74, "column": 3, - "index": 3667 + "index": 3726 } }, { @@ -64,14 +64,14 @@ "defaultMessage": "!!!/{idx}", "file": "src/features/Transactions/common/strings.tsx", "start": { - "line": 77, + "line": 78, "column": 24, - "index": 3738 + "index": 3797 }, "end": { - "line": 80, + "line": 81, "column": 3, - "index": 3839 + "index": 3898 } }, { @@ -79,14 +79,14 @@ "defaultMessage": "!!!/change", "file": "src/features/Transactions/common/strings.tsx", "start": { - "line": 81, + "line": 82, "column": 23, - "index": 3864 + "index": 3923 }, "end": { - "line": 84, + "line": 85, "column": 3, - "index": 3965 + "index": 4024 } }, { @@ -94,14 +94,14 @@ "defaultMessage": "!!!not mine", "file": "src/features/Transactions/common/strings.tsx", "start": { - "line": 85, + "line": 86, "column": 24, - "index": 3991 + "index": 4050 }, "end": { - "line": 88, + "line": 89, "column": 3, - "index": 4094 + "index": 4153 } }, { @@ -109,14 +109,14 @@ "defaultMessage": "!!!Fee:", "file": "src/features/Transactions/common/strings.tsx", "start": { - "line": 89, + "line": 90, "column": 16, - "index": 4112 + "index": 4171 }, "end": { - "line": 92, + "line": 93, "column": 3, - "index": 4195 + "index": 4254 } }, { @@ -124,14 +124,14 @@ "defaultMessage": "!!!From Addresses", "file": "src/features/Transactions/common/strings.tsx", "start": { - "line": 93, + "line": 94, "column": 17, - "index": 4214 + "index": 4273 }, "end": { - "line": 96, + "line": 97, "column": 3, - "index": 4316 + "index": 4375 } }, { @@ -139,14 +139,14 @@ "defaultMessage": "!!!To Addresses", "file": "src/features/Transactions/common/strings.tsx", "start": { - "line": 97, + "line": 98, "column": 15, - "index": 4333 + "index": 4392 }, "end": { - "line": 100, + "line": 101, "column": 3, - "index": 4431 + "index": 4490 } }, { @@ -154,14 +154,14 @@ "defaultMessage": "!!!Memo", "file": "src/features/Transactions/common/strings.tsx", "start": { - "line": 101, + "line": 102, "column": 8, - "index": 4441 + "index": 4500 }, "end": { - "line": 104, + "line": 105, "column": 3, - "index": 4524 + "index": 4583 } }, { @@ -169,14 +169,14 @@ "defaultMessage": "!!!Transaction ID", "file": "src/features/Transactions/common/strings.tsx", "start": { - "line": 105, + "line": 106, "column": 17, - "index": 4543 + "index": 4602 }, "end": { - "line": 108, + "line": 109, "column": 3, - "index": 4645 + "index": 4704 } }, { @@ -184,14 +184,14 @@ "defaultMessage": "!!!Transaction assurance level", "file": "src/features/Transactions/common/strings.tsx", "start": { - "line": 109, + "line": 110, "column": 20, - "index": 4667 + "index": 4726 }, "end": { - "line": 112, + "line": 113, "column": 3, - "index": 4785 + "index": 4844 } }, { @@ -199,14 +199,14 @@ "defaultMessage": "!!!{cnt} {cnt, plural, one {CONFIRMATION} other {CONFIRMATIONS}}", "file": "src/features/Transactions/common/strings.tsx", "start": { - "line": 113, + "line": 114, "column": 17, - "index": 4804 + "index": 4863 }, "end": { - "line": 116, + "line": 117, "column": 3, - "index": 4953 + "index": 5012 } }, { @@ -214,14 +214,14 @@ "defaultMessage": "!!!+ {cnt} omitted {cnt, plural, one {address} other {addresses}}", "file": "src/features/Transactions/common/strings.tsx", "start": { - "line": 117, + "line": 118, "column": 16, - "index": 4971 + "index": 5030 }, "end": { - "line": 120, + "line": 121, "column": 3, - "index": 5120 + "index": 5179 } }, { @@ -229,14 +229,14 @@ "defaultMessage": "!!!Open in explorer", "file": "src/features/Transactions/common/strings.tsx", "start": { - "line": 121, + "line": 122, "column": 18, - "index": 5140 + "index": 5199 }, "end": { - "line": 124, + "line": 125, "column": 3, - "index": 5221 + "index": 5280 } }, { @@ -244,14 +244,14 @@ "defaultMessage": "!!!Transactions", "file": "src/features/Transactions/common/strings.tsx", "start": { - "line": 125, + "line": 126, "column": 9, - "index": 5232 + "index": 5291 }, "end": { - "line": 128, + "line": 129, "column": 3, - "index": 5324 + "index": 5383 } }, { @@ -259,14 +259,14 @@ "defaultMessage": "!!!Note:", "file": "src/features/Transactions/common/strings.tsx", "start": { - "line": 129, + "line": 130, "column": 16, - "index": 5342 + "index": 5401 }, "end": { - "line": 132, + "line": 133, "column": 3, - "index": 5441 + "index": 5500 } }, { @@ -274,14 +274,14 @@ "defaultMessage": "!!!The Shelley protocol upgrade adds a new Shelley wallet type which supports delegation.", "file": "src/features/Transactions/common/strings.tsx", "start": { - "line": 133, + "line": 134, "column": 11, - "index": 5454 + "index": 5513 }, "end": { - "line": 136, + "line": 137, "column": 3, - "index": 5636 + "index": 5695 } }, { @@ -289,14 +289,14 @@ "defaultMessage": "!!!No transactions to show yet", "file": "src/features/Transactions/common/strings.tsx", "start": { - "line": 137, + "line": 138, "column": 18, - "index": 5656 + "index": 5715 }, "end": { - "line": 140, + "line": 141, "column": 3, - "index": 5772 + "index": 5831 } }, { @@ -304,14 +304,14 @@ "defaultMessage": "!!!Fee", "file": "src/features/Transactions/common/strings.tsx", "start": { - "line": 141, + "line": 142, "column": 7, - "index": 5781 + "index": 5840 }, "end": { - "line": 144, + "line": 145, "column": 3, - "index": 5870 + "index": 5929 } }, { @@ -320,14 +320,14 @@ "defaultMessage": "!!!{cnt} assets", "file": "src/features/Transactions/common/strings.tsx", "start": { - "line": 145, + "line": 146, "column": 10, - "index": 5882 + "index": 5941 }, "end": { - "line": 149, + "line": 150, "column": 3, - "index": 6034 + "index": 6093 } }, { @@ -335,14 +335,14 @@ "defaultMessage": "!!!ADA sent", "file": "src/features/Transactions/common/strings.tsx", "start": { - "line": 150, + "line": 151, "column": 23, - "index": 6059 + "index": 6118 }, "end": { - "line": 153, + "line": 154, "column": 3, - "index": 6169 + "index": 6228 } }, { @@ -350,14 +350,14 @@ "defaultMessage": "!!!ADA received", "file": "src/features/Transactions/common/strings.tsx", "start": { - "line": 154, + "line": 155, "column": 27, - "index": 6198 + "index": 6257 }, "end": { - "line": 157, + "line": 158, "column": 3, - "index": 6316 + "index": 6375 } }, { @@ -365,14 +365,14 @@ "defaultMessage": "!!!Intrawallet", "file": "src/features/Transactions/common/strings.tsx", "start": { - "line": 158, + "line": 159, "column": 23, - "index": 6341 + "index": 6400 }, "end": { - "line": 161, + "line": 162, "column": 3, - "index": 6454 + "index": 6513 } }, { @@ -380,14 +380,14 @@ "defaultMessage": "!!!Multiparty", "file": "src/features/Transactions/common/strings.tsx", "start": { - "line": 162, + "line": 163, "column": 24, - "index": 6480 + "index": 6539 }, "end": { - "line": 165, + "line": 166, "column": 3, - "index": 6593 + "index": 6652 } }, { @@ -395,14 +395,14 @@ "defaultMessage": "!!![Unknown asset name]", "file": "src/features/Transactions/common/strings.tsx", "start": { - "line": 166, + "line": 167, "column": 20, - "index": 6615 + "index": 6674 }, "end": { - "line": 169, + "line": 170, "column": 3, - "index": 6708 + "index": 6767 } }, { @@ -410,14 +410,14 @@ "defaultMessage": "!!!Your wallet address", "file": "src/features/Transactions/common/strings.tsx", "start": { - "line": 170, + "line": 171, "column": 17, - "index": 6727 + "index": 6786 }, "end": { - "line": 173, + "line": 174, "column": 3, - "index": 6835 + "index": 6894 } }, { @@ -425,14 +425,14 @@ "defaultMessage": "!!!BIP32 path:", "file": "src/features/Transactions/common/strings.tsx", "start": { - "line": 174, + "line": 175, "column": 13, - "index": 6850 + "index": 6909 }, "end": { - "line": 177, + "line": 178, "column": 3, - "index": 6946 + "index": 7005 } }, { @@ -440,14 +440,29 @@ "defaultMessage": "!!!Copy address", "file": "src/features/Transactions/common/strings.tsx", "start": { - "line": 178, + "line": 179, "column": 13, - "index": 6961 + "index": 7020 + }, + "end": { + "line": 182, + "column": 3, + "index": 7117 + } + }, + { + "id": "components.receive.addressmodal.copiedLabel", + "defaultMessage": "!!!Address Copied", + "file": "src/features/Transactions/common/strings.tsx", + "start": { + "line": 183, + "column": 15, + "index": 7134 }, "end": { - "line": 181, + "line": 186, "column": 3, - "index": 7058 + "index": 7235 } }, { @@ -455,14 +470,14 @@ "defaultMessage": "!!!Spending", "file": "src/features/Transactions/common/strings.tsx", "start": { - "line": 182, + "line": 187, "column": 12, - "index": 7072 + "index": 7249 }, "end": { - "line": 185, + "line": 190, "column": 3, - "index": 7171 + "index": 7348 } }, { @@ -470,14 +485,14 @@ "defaultMessage": "!!!Staking", "file": "src/features/Transactions/common/strings.tsx", "start": { - "line": 186, + "line": 191, "column": 11, - "index": 7184 + "index": 7361 }, "end": { - "line": 189, + "line": 194, "column": 3, - "index": 7281 + "index": 7458 } }, { @@ -485,14 +500,14 @@ "defaultMessage": "!!!Title", "file": "src/features/Transactions/common/strings.tsx", "start": { - "line": 190, + "line": 195, "column": 20, - "index": 7303 + "index": 7480 }, "end": { - "line": 193, + "line": 198, "column": 3, - "index": 7389 + "index": 7566 } }, { @@ -500,14 +515,14 @@ "defaultMessage": "!!!Verify Address on Ledger", "file": "src/features/Transactions/common/strings.tsx", "start": { - "line": 194, + "line": 199, "column": 15, - "index": 7406 + "index": 7583 }, "end": { - "line": 197, + "line": 202, "column": 3, - "index": 7517 + "index": 7694 } } ] \ No newline at end of file