thorswap / SwapKit

SwapKit SDK - Integrate blockchains easily. Docs - https://docs.thorswap.finance/swapkit-docs
https://swapkit.dev
Apache License 2.0
48 stars 23 forks source link

Swapkit SDK Swapping Bug #908

Closed kamalbuilds closed 3 weeks ago

kamalbuilds commented 1 month ago

Current behavior

ModuleDependencyError: export 'getMemoForNamePreferredAssetRegister' (imported as 'j1') was not found in '@swapkit/helpers' (possible exports: AGG_SWAP, ApproveMode, AssetValue, BaseDecimal, BigIntArithmetics, Chain, ChainId, ChainIdToChain, ChainToChainId, ChainToExplorerUrl, ChainToHexChainId, ChainToRPC, CommonAssetStrings, ContractAddress, CosmosChains, DerivationPath, EVMChains, EVMTransactionDetailsParamsSchema, EVMTransactionDetailsSchema, EstimatedTimeSchema, ExplorerUrl, FeeOption, FeeTypeEnum, FeesSchema, LedgerErrorCode, MAYASupportedChains, MayaArbitrumVaultAbi, MayaEthereumVaultAbi, MemoType, NetworkDerivationPath, ProviderName, QuoteMode, QuoteRequestSchema, QuoteResponseSchema, RPCUrl, RequestClient, RouteLegSchema, RouteLegWithoutAddressesSchema, RouteQuoteLegSchema, RouteQuoteMetadataAssetSchema, RouteQuoteMetadataSchema, RouteQuoteSchema, RouteQuoteWarningSchema, SWAP_IN, SWAP_OUT, SubstrateChains, SwapKitError, SwapKitNumber, TCAvalancheDepositABI, TCBscDepositABI, TCEthereumVaultAbi, TCSupportedChains, UTXOChains, WalletOption, WarningCodeEnum, addAccountsChangedCallback, addEVMWalletNetwork, assetFromString, defaultRequestHeaders, derivationPathToString, erc20ABI, filterAssets, findAssetBy, formatBigIntToSafeValue, getAssetType, getAsymmetricAssetShare, getAsymmetricAssetWithdrawAmount, getAsymmetricRuneShare, getAsymmetricRuneWithdrawAmount, getChainIdentifier, getCommonAssetInfo, getDecimal, getDerivationPathFor, getEIP6963Wallets, getETHDefaultWallet, getEstimatedPoolShare, getGasAsset, getLiquiditySlippage, getMAYANameCost, getMemoFor, getMemoForDeposit, getMemoForLeaveAndBond, getMemoForLoan, getMemoForNameRegister, getMemoForSaverDeposit, getMemoForSaverWithdraw, getMemoForUnbond, getMemoForWithdraw, getMinAmountByChain, getSymmetricPoolShare, getSymmetricWithdraw, getTHORNameCost, getWalletFormatFor, isDetected, isGasAsset, isWeb3Detected, listWeb3EVMWallets, okxMobileEnabled, prepareNetworkSwitch, setRequestClientConfig, switchEVMWalletNetwork, validateIdentifier, validateTNS, warnOnce, wrapMethodWithNetworkSwitch, wrapWithThrow)

image

Expected behavior

This error should not come

Functionality

Packages

Details

Package versions:

# Paste the output of `<npm|yarn|pnpm|bun pm> ls --depth=0 | grep @swapkit` here
"@swapkit/core": "^1.1.1",
"@swapkit/plugin-chainflip": "^1.1.1",
"@swapkit/plugin-thorchain": "^1.1.1",
"@swapkit/sdk": "^1.1.2",
"@swapkit/tokens": "^1.0.1",
"@swapkit/wallet-coinbase": "^1.0.6",
"@swapkit/wallet-evm-extensions": "^1.0.6",
"@swapkit/wallet-keplr": "^1.0.6",
"@swapkit/wallet-keystore": "^1.0.6",
"@swapkit/wallet-wc": "^1.0.6",
"@swapkit/wallet-xdefi": "^1.0.6",
kamalbuilds commented 1 month ago

@chillios-dev Please help fix this error , stuck at this from many hours

chillios-dev commented 1 month ago

@kamalbuilds try newest build versions - it seems like @swapkit/helpers didn't release properly with rest packages

kamalbuilds commented 1 month ago

@chillios-dev theres one more coming from inside the packages.

image

kamalbuilds commented 1 month ago

By debugging I found it to occur from this file , https://github.com/thorswap/SwapKit/blob/develop/packages/wallets/keystore/src/keystore.ts#L253

chillios-dev commented 3 weeks ago

The core of this issue has been resolved - if there are any new ones - please create new issue with info of versions used and setup of framework with code samples