diff --git a/src/background/vmModules/ApprovalController.test.ts b/src/background/vmModules/ApprovalController.test.ts index 09e73cc0..bf3eaa43 100644 --- a/src/background/vmModules/ApprovalController.test.ts +++ b/src/background/vmModules/ApprovalController.test.ts @@ -231,7 +231,8 @@ describe('src/background/vmModules/ApprovalController', () => { inputs: btcTx.inputs, outputs: btcTx.outputs, }), - btcNetwork + btcNetwork, + action.tabId ); expect(await promise).toEqual({ @@ -270,7 +271,8 @@ describe('src/background/vmModules/ApprovalController', () => { inputs: btcTx.inputs, outputs: btcTx.outputs, }), - btcNetwork + btcNetwork, + action.tabId ); expect(await promise).toEqual({ signedData: signedTx }); diff --git a/src/background/vmModules/ApprovalController.ts b/src/background/vmModules/ApprovalController.ts index 82f1641f..7e4bbd65 100644 --- a/src/background/vmModules/ApprovalController.ts +++ b/src/background/vmModules/ApprovalController.ts @@ -175,7 +175,11 @@ export class ApprovalController implements IApprovalController { case RpcMethod.BITCOIN_SEND_TRANSACTION: case RpcMethod.BITCOIN_SIGN_TRANSACTION: case RpcMethod.ETH_SEND_TRANSACTION: - return await this.#walletService.sign(signingData.data, network); + return await this.#walletService.sign( + signingData.data, + network, + action.tabId + ); default: throw new Error('Unrecognized method: ' + params.request.method); diff --git a/src/pages/Bridge/components/BridgeForm.tsx b/src/pages/Bridge/components/BridgeForm.tsx index ae068dbf..e0ab4192 100644 --- a/src/pages/Bridge/components/BridgeForm.tsx +++ b/src/pages/Bridge/components/BridgeForm.tsx @@ -212,7 +212,7 @@ export const BridgeForm = ({ const [neededGas, setNeededGas] = useState(0n); useEffect(() => { - if (minimum && amount.lt(minimum)) { + if (minimum && amount.gt(0) && amount.lt(minimum)) { setIsAmountTooLow(true); } else { setIsAmountTooLow(false); diff --git a/src/pages/SignTransaction/components/SpendLimitInfo/TokenSpendLimit.tsx b/src/pages/SignTransaction/components/SpendLimitInfo/TokenSpendLimit.tsx index 976bc5e3..14e301a1 100644 --- a/src/pages/SignTransaction/components/SpendLimitInfo/TokenSpendLimit.tsx +++ b/src/pages/SignTransaction/components/SpendLimitInfo/TokenSpendLimit.tsx @@ -133,13 +133,7 @@ export function TokenSpendLimit({ displayValue: isInfinite ? t('Unlimited') : (diffItemValue as TokenUnit).toDisplay(), - usdPrice: - isInfinite || !approval.usdPrice - ? undefined - : String( - (diffItemValue as TokenUnit).toDisplay({ asNumber: true }) * - Number(approval.usdPrice) - ), + usdPrice: approval.usdPrice, }} />