From 02090880ab91529273d6064a24d340175730a736 Mon Sep 17 00:00:00 2001 From: Anastasiia Sokolova <63446892+sokolova-an@users.noreply.github.com> Date: Fri, 13 Dec 2024 19:42:29 +0900 Subject: [PATCH] fix: transfer fee add transactionType (#2860) --- src/renderer/widgets/Transfer/model/form-model.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/renderer/widgets/Transfer/model/form-model.ts b/src/renderer/widgets/Transfer/model/form-model.ts index 234fb1862..17499e5f1 100644 --- a/src/renderer/widgets/Transfer/model/form-model.ts +++ b/src/renderer/widgets/Transfer/model/form-model.ts @@ -29,7 +29,7 @@ import { import { createTxStore } from '@/shared/transactions'; import { balanceModel, balanceUtils } from '@/entities/balance'; import { networkModel, networkUtils } from '@/entities/network'; -import { transactionBuilder, transactionService } from '@/entities/transaction'; +import { TransferType, transactionBuilder, transactionService } from '@/entities/transaction'; import { accountUtils, walletModel, walletUtils } from '@/entities/wallet'; import { TransferRules } from '@/features/operations/OperationsValidation'; import { type NetworkStore } from '../lib/types'; @@ -216,17 +216,17 @@ const $fakeTx = combine( { network: $networkStore, isConnected: $isChainConnected, - isXcm: $isXcm, xcmData: xcmTransferModel.$xcmData, }, - ({ isConnected, network, isXcm, xcmData }): Transaction | null => { + ({ isConnected, network, xcmData }): Transaction | null => { if (!network || !isConnected) return null; - console.log(xcmData, isXcm); + + const transactionType = network.asset.type ? TransferType[network.asset.type] : TransactionType.TRANSFER; return { chainId: network.chain.chainId, address: toAddress(TEST_ACCOUNTS[0], { prefix: network.chain.addressPrefix }), - type: TransactionType.TRANSFER, + type: transactionType, args: { destination: toAddress(TEST_ACCOUNTS[0], { prefix: network.chain.addressPrefix }), ...xcmData?.args }, }; },