Fix NFT auto token and balance detection for Sepolia

pull/6992/head
Hwee-Boon Yar 1 year ago
parent 50af615ba8
commit f9186a8823
  1. 4
      modules/AlphaWalletFoundation/AlphaWalletFoundation/Tokens/Logic/EtherscanCompatibleBlockchainExplorer.swift
  2. 5
      modules/AlphaWalletFoundation/AlphaWalletFoundation/Transactions/EtherscanSingleChainTransactionProvider.swift

@ -589,9 +589,9 @@ extension EtherscanCompatibleBlockchainExplorer.functional {
//TODO should move this to where the blockchain APIs are defined so we can update them in lock-step?
static func serverSupportsFetchingNftTransactions(_ server: RPCServer) -> Bool {
switch server {
case .main, .polygon, .binance_smart_chain, .binance_smart_chain_testnet, .optimistic, .cronosMainnet, .arbitrum, .arbitrumGoerli, .avalanche, .avalanche_testnet, .heco, .heco_testnet:
case .main, .polygon, .binance_smart_chain, .binance_smart_chain_testnet, .optimistic, .cronosMainnet, .arbitrum, .arbitrumGoerli, .avalanche, .avalanche_testnet, .heco, .heco_testnet, .sepolia:
return true
case .goerli, .fantom, .fantom_testnet, .mumbai_testnet, .klaytnCypress, .klaytnBaobabTestnet, .ioTeX, .ioTeXTestnet, .okx, .sepolia, .classic, .xDai, .callisto, .cronosTestnet, .palm, .palmTestnet, .optimismGoerli:
case .goerli, .fantom, .fantom_testnet, .mumbai_testnet, .klaytnCypress, .klaytnBaobabTestnet, .ioTeX, .ioTeXTestnet, .okx, .classic, .xDai, .callisto, .cronosTestnet, .palm, .palmTestnet, .optimismGoerli:
return false
case .custom(let customRpc):
switch customRpc.etherscanCompatibleType {

@ -318,6 +318,11 @@ extension EtherscanSingleChainTransactionProvider {
}
func fetchPublisher() -> AnyPublisher<[Transaction], PromiseError> {
//TODO can remove after a while, maybe? This is to fix previously marking it as not supported
if transferType == .erc721 && session.server == .sepolia {
stateProvider.state = .initial
}
guard stateProvider.state != .stopped else {
return .fail(PromiseError(error: SchedulerError.cancelled))
}

Loading…
Cancel
Save