diff --git a/packages/neuron-ui/src/components/AmendPendingTransactionDialog/hooks.ts b/packages/neuron-ui/src/components/AmendPendingTransactionDialog/hooks.ts index cef45ef8e9..dfb4afc26a 100644 --- a/packages/neuron-ui/src/components/AmendPendingTransactionDialog/hooks.ts +++ b/packages/neuron-ui/src/components/AmendPendingTransactionDialog/hooks.ts @@ -41,12 +41,11 @@ export const useInitialize = ({ const fetchInitData = useCallback(async () => { const res = await getOnChainTransaction(tx.hash) const { - // @ts-expect-error Replace-By-Fee (RBF) - min_replace_fee: minFee, + minReplaceFee, transaction: { outputsData }, } = res - if (!minFee) { + if (!minReplaceFee) { setIsConfirmedAlertShown(true) } @@ -60,8 +59,8 @@ export const useInitialize = ({ }) setSize(txResult.size) - if (minFee) { - const mPrice = ((BigInt(minFee) * BigInt(FEE_RATIO)) / BigInt(txResult.size)).toString() + if (minReplaceFee) { + const mPrice = ((BigInt(minReplaceFee) * BigInt(FEE_RATIO)) / BigInt(txResult.size)).toString() setMinPrice(mPrice) setPrice(mPrice) } @@ -83,9 +82,8 @@ export const useInitialize = ({ const onSubmit = useCallback(async () => { try { - // @ts-expect-error Replace-By-Fee (RBF) - const { min_replace_fee: minFee } = await getOnChainTransaction(tx.hash) - if (!minFee) { + const { minReplaceFee } = await getOnChainTransaction(tx.hash) + if (!minReplaceFee) { setIsConfirmedAlertShown(true) return } diff --git a/packages/neuron-ui/src/components/AmendSUDTSend/amendSUDTSend.module.scss b/packages/neuron-ui/src/components/AmendSUDTSend/amendSUDTSend.module.scss index 8194ab6031..7b971044b1 100644 --- a/packages/neuron-ui/src/components/AmendSUDTSend/amendSUDTSend.module.scss +++ b/packages/neuron-ui/src/components/AmendSUDTSend/amendSUDTSend.module.scss @@ -38,9 +38,6 @@ $noticeHeight: 60px; padding: 20px 16px 18px; border-radius: 16px; margin-bottom: 16px; - .addresstField { - font-family: 'JetBrains Mono'; - } .textFieldClass { margin-bottom: 10px; } diff --git a/packages/neuron-ui/src/components/AmendSUDTSend/hooks.ts b/packages/neuron-ui/src/components/AmendSUDTSend/hooks.ts index 199ec5f37c..b82355cec2 100644 --- a/packages/neuron-ui/src/components/AmendSUDTSend/hooks.ts +++ b/packages/neuron-ui/src/components/AmendSUDTSend/hooks.ts @@ -46,11 +46,10 @@ export const useInitialize = ({ const fetchInitData = useCallback(async () => { const { - // @ts-expect-error Replace-By-Fee (RBF) - min_replace_fee: minFee, + minReplaceFee, transaction: { outputsData }, } = await getOnChainTransaction(hash) - if (!minFee) { + if (!minReplaceFee) { setIsConfirmedAlertShown(true) } @@ -76,8 +75,8 @@ export const useInitialize = ({ setTransaction({ ...tx, outputsData }) setSize(tx.size) - if (minFee) { - const mPrice = ((BigInt(minFee) * BigInt(FEE_RATIO)) / BigInt(tx.size)).toString() + if (minReplaceFee) { + const mPrice = ((BigInt(minReplaceFee) * BigInt(FEE_RATIO)) / BigInt(tx.size)).toString() setMinPrice(mPrice) setPrice(mPrice) } @@ -98,9 +97,8 @@ export const useInitialize = ({ return } try { - // @ts-expect-error Replace-By-Fee (RBF) - const { min_replace_fee: minFee } = await getOnChainTransaction(hash) - if (!minFee) { + const { minReplaceFee } = await getOnChainTransaction(hash) + if (!minReplaceFee) { setIsConfirmedAlertShown(true) return } diff --git a/packages/neuron-ui/src/components/AmendSend/amendSend.module.scss b/packages/neuron-ui/src/components/AmendSend/amendSend.module.scss index 0b823d03ec..10302555ae 100644 --- a/packages/neuron-ui/src/components/AmendSend/amendSend.module.scss +++ b/packages/neuron-ui/src/components/AmendSend/amendSend.module.scss @@ -38,9 +38,6 @@ $noticeHeight: 60px; padding: 20px 16px 18px; border-radius: 16px; margin-bottom: 16px; - .addresstField { - font-family: 'JetBrains Mono'; - } .textFieldClass { margin-bottom: 10px; } diff --git a/packages/neuron-ui/src/components/AmendSend/hooks.ts b/packages/neuron-ui/src/components/AmendSend/hooks.ts index 26402bea26..5e82ccdc02 100644 --- a/packages/neuron-ui/src/components/AmendSend/hooks.ts +++ b/packages/neuron-ui/src/components/AmendSend/hooks.ts @@ -70,11 +70,10 @@ export const useInitialize = ({ const fetchInitData = useCallback(async () => { const res = await getOnChainTransaction(hash) const { - // @ts-expect-error Replace-By-Fee (RBF) - min_replace_fee: minFee, + minReplaceFee, transaction: { outputsData }, } = res - if (!minFee) { + if (!minReplaceFee) { setIsConfirmedAlertShown(true) } @@ -87,8 +86,8 @@ export const useInitialize = ({ }) setSize(tx.size) - if (minFee) { - const mPrice = ((BigInt(minFee) * BigInt(FEE_RATIO)) / BigInt(tx.size)).toString() + if (minReplaceFee) { + const mPrice = ((BigInt(minReplaceFee) * BigInt(FEE_RATIO)) / BigInt(tx.size)).toString() setMinPrice(mPrice) updateTransactionPrice(mPrice) } @@ -113,9 +112,8 @@ export const useInitialize = ({ return } try { - // @ts-expect-error Replace-By-Fee (RBF) - const { min_replace_fee: minFee } = await getOnChainTransaction(hash) - if (!minFee) { + const { minReplaceFee } = await getOnChainTransaction(hash) + if (!minReplaceFee) { setIsConfirmedAlertShown(true) return } diff --git a/packages/neuron-ui/src/components/History/RowExtend.tsx b/packages/neuron-ui/src/components/History/RowExtend.tsx index 8012a6c6b7..4a6c995223 100644 --- a/packages/neuron-ui/src/components/History/RowExtend.tsx +++ b/packages/neuron-ui/src/components/History/RowExtend.tsx @@ -86,8 +86,7 @@ const RowExtend = ({ column, columns, isMainnet, id, bestBlockNumber, isWatchOnl setAmendabled(false) if (status !== 'success' && column.type !== 'receive' && !isWatchOnly) { getOnChainTransaction(hash).then(tx => { - // @ts-expect-error Replace-By-Fee (RBF) - const { min_replace_fee: minReplaceFee } = tx + const { minReplaceFee } = tx if (minReplaceFee) { setAmendabled(true) } diff --git a/packages/neuron-ui/src/components/SendFieldset/index.tsx b/packages/neuron-ui/src/components/SendFieldset/index.tsx index cdbf2b0f23..3d536a693e 100644 --- a/packages/neuron-ui/src/components/SendFieldset/index.tsx +++ b/packages/neuron-ui/src/components/SendFieldset/index.tsx @@ -68,7 +68,7 @@ const SendFieldset = ({ return (