From 18039f6bc76d9760a5d1df2e262aef7dcd6a463f Mon Sep 17 00:00:00 2001 From: AricRedemption Date: Sun, 14 Apr 2024 14:04:20 +0800 Subject: [PATCH] chore: add TransactionResultModal confirmText --- src/global-types.ts | 3 +++ src/pages/wallet/SendToken.vue | 1 + .../wallet/components/TransactionResultModal.vue | 16 +++++++--------- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/global-types.ts b/src/global-types.ts index 8ca9c3c..5504d84 100644 --- a/src/global-types.ts +++ b/src/global-types.ts @@ -7,6 +7,7 @@ type SuccessResult = { fromAddress: string toAdddress: string amount: number + confirmText?: string token: { symbol: string decimal: number @@ -16,9 +17,11 @@ type FailedResult = { status: 'failed' message: string router?: string + confirmText?: string } type WarningResult = { status: 'warning' message: string + confirmText?: string } export type TransactionResult = SuccessResult | FailedResult | WarningResult diff --git a/src/pages/wallet/SendToken.vue b/src/pages/wallet/SendToken.vue index 5c9ff6c..0f12641 100644 --- a/src/pages/wallet/SendToken.vue +++ b/src/pages/wallet/SendToken.vue @@ -98,6 +98,7 @@ async function send() { router: 'ft-merge', status: 'failed', message: err.message, + confirmText: 'Merge', } } } else { diff --git a/src/pages/wallet/components/TransactionResultModal.vue b/src/pages/wallet/components/TransactionResultModal.vue index e33800e..34cf1d3 100644 --- a/src/pages/wallet/components/TransactionResultModal.vue +++ b/src/pages/wallet/components/TransactionResultModal.vue @@ -19,6 +19,7 @@ type SuccessResult = { fromAddress: string toAdddress: string amount: number + confirmText?: string token: { symbol: string decimal: number @@ -28,15 +29,18 @@ type SuccessTxsResult = { chain: Chain status: 'successTxs' txIds: string[] + confirmText?: string } type FailedResult = { status: 'failed' message: string router?: string + confirmText?: string } type WarningResult = { status: 'warning' message: string + confirmText?: string } export type TransactionResult = SuccessTxsResult | SuccessResult | FailedResult | WarningResult const props = defineProps({ @@ -163,20 +167,14 @@ const toResultTxs = async (txId: string) => { Cancel