Skip to content

Commit

Permalink
fix: transfer shows 0 network fee (#2855)
Browse files Browse the repository at this point in the history
  • Loading branch information
sokolova-an authored Dec 12, 2024
1 parent 32f9d56 commit c1caded
Show file tree
Hide file tree
Showing 9 changed files with 80 additions and 239 deletions.
2 changes: 1 addition & 1 deletion src/renderer/entities/transaction/ui/Fee/Fee.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ type Props = {
api: ApiPromise | null;
multiply?: number;
asset: Asset;
transaction?: Transaction;
transaction?: Transaction | null;
className?: string;
onFeeChange?: (fee: string) => void;
onFeeLoading?: (loading: boolean) => void;
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/entities/transaction/ui/XcmFee/XcmFee.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type Props = {
multiply?: number;
asset: Asset;
config: XcmConfig;
transaction?: Transaction | DecodedTransaction;
transaction?: Transaction | DecodedTransaction | null;
className?: string;
onFeeChange?: (fee: string) => void;
onFeeLoading?: (loading: boolean) => void;
Expand Down
57 changes: 0 additions & 57 deletions src/renderer/features/governance/lib/createFeeCalculator.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ import { type Store, combine, createStore } from 'effector';

import { type Account, type Chain, type Transaction, type Wallet } from '@/shared/core';
import { nullable } from '@/shared/lib/utils';
import { createFeeCalculator } from '@/shared/transactions';
import { transactionService } from '@/entities/transaction';
import { accountUtils, walletUtils } from '@/entities/wallet';

import { createFeeCalculator } from './createFeeCalculator';

type Params = {
$api: Store<ApiPromise | null>;
$chain: Store<Chain | null>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,11 @@ import {
type Wallet,
} from '@/shared/core';
import { nullable, toAddress, transferableAmountBN } from '@/shared/lib/utils';
import { createTxStore } from '@/shared/transactions';
import { balanceUtils } from '@/entities/balance';
import { transactionService } from '@/entities/transaction';
import { accountUtils, walletModel, walletUtils } from '@/entities/wallet';

import { createTxStore } from './createTxStore';

export type BasicFormParams = {
account: Account | null;
signatory: Account | null;
Expand Down
83 changes: 0 additions & 83 deletions src/renderer/features/governance/lib/createTxStore.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/renderer/shared/transactions/createTxStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ type Params = {
$api: Store<ApiPromise | null>;
$chain: Store<Chain | null>;
$coreTx: Store<Transaction | null>;
$activeWallet: Store<Wallet | null>;
$activeWallet: Store<Wallet | null | undefined>;
$wallets: Store<Wallet[]>;
$account: Store<Account | null>;
$signatory?: Store<Account | null>;
Expand Down
Loading

0 comments on commit c1caded

Please sign in to comment.