Skip to content

Commit

Permalink
fix: 🎨 fixed typeCheck
Browse files Browse the repository at this point in the history
  • Loading branch information
sadiabbasi committed Jan 8, 2025
1 parent 94173f0 commit 205bc47
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/components/Transaction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { QuestionMark, WarningCircle } from 'iconoir-react-native';
import NegligibleTransactionFees from './NegligibleTransactionFees';
import { KeyValue } from '../utils/strings';
import { formatCurrencyValue } from '../utils/numbers';
import Decimal from 'decimal.js';

export type TransactionFeeData = {
fee: string;
Expand Down Expand Up @@ -203,7 +204,7 @@ export function ContractOperationDetails({ operation, date }: { operation: Opera
}

export function isFree(asset: IAsset, usdFee: number): boolean {
return asset.getAmount() === BigInt(0) && usdFee === 0;
return asset.getAmount() === new Decimal(0) && usdFee === 0;
}

// shows the fee only if the transaction does not contain asset transfers, or is not free
Expand Down
2 changes: 1 addition & 1 deletion src/utils/chain/etherum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ export class WalletConnectSession implements IChainSession {
const transactionRequest: TransactionRequest = {
to: (await transaction.getTo()).getName(),
from: (await transaction.getFrom()).getName(),
value: (await transaction.getValue()).getAmount(),
value: (await transaction.getValue()).getAmount().toString(),
data: (await transaction.getData()).data,
};

Expand Down

0 comments on commit 205bc47

Please sign in to comment.