Skip to content

Commit

Permalink
[issue-1122] Crash app in case select token when send fund
Browse files Browse the repository at this point in the history
  • Loading branch information
ThucNguyen authored and nguyenduythuc committed Nov 6, 2023
1 parent 71ed0ac commit 0f184b9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/hooks/screen/Transaction/useTransactionV2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export const useTransaction = <T extends TransactionFormValues = TransactionForm
setTimeout(() => {
appModalContext.setConfirmModal({
visible: true,
message: i18n.common.enableChainMessage(chainInfoMap[chain].name),
message: i18n.formatString(i18n.common.enableChainMessage, chainInfoMap[chain].name),
title: i18n.common.enableChain,
onCancelModal: () => {
appModalContext.hideConfirmModal();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,11 @@ const mortalityAsString = (era: ExtrinsicEra, hexBlockNumber: string): string =>
const blockNumber = bnToBn(hexBlockNumber);
const mortal = era.asMortalEra;

return i18n.confirmation.lifeTimeContent
.replace('{{birth}}', formatNumber(mortal.birth(blockNumber)))
.replace('{{death}}', formatNumber(mortal.death(blockNumber)));
return i18n.formatString(
i18n.confirmation.lifeTimeContent,
formatNumber(mortal.birth(blockNumber)),
formatNumber(mortal.death(blockNumber)),
);
};

const SubstrateTransactionDetail: React.FC<Props> = (props: Props) => {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/i18n/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -908,7 +908,7 @@
"requestWithAccount": "You are approving a request with account",
"messageDetail": "Message details",
"transactionDetail": "Transaction details",
"lifeTimeContent": "mortal, valid from {{0}} to {{1}}",
"lifeTimeContent": "mortal, valid from {0} to {1}",
"addNetworkRequest": "Add network request",
"addTokenRequest": "Add token request",
"providerUrl": "Provider URL",
Expand Down

0 comments on commit 0f184b9

Please sign in to comment.