Skip to content

Commit da10296

Browse files
authored
Merge branch 'master' into quickstart-assembly
2 parents 7fc96d9 + 637e610 commit da10296

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

Packages/Sequence-Unity/Sequence/SequenceSDK/EmbeddedWallet/SequenceWallet.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -316,15 +316,15 @@ private async Task<FeeOptionsResponse> DetermineWhichFeeOptionsUserHasInWallet(I
316316
requiredBalance <= etherBalance.balanceWei);
317317
break;
318318
case FeeTokenType.erc20Token:
319+
var erc20Address = new Address(token.contractAddress);
319320
GetTokenBalancesReturn tokenBalances = await indexer.GetTokenBalances(new GetTokenBalancesArgs(
320-
_address, token.contractAddress));
321+
_address, erc20Address));
322+
321323
if (tokenBalances.balances.Length > 0)
322324
{
323-
if (tokenBalances.balances[0].contractAddress != token.contractAddress)
324-
{
325-
throw new Exception(
326-
$"Expected contract address from indexer response ({tokenBalances.balances[0].contractAddress}) to match contract address we queried ({token.contractAddress})");
327-
}
325+
var balanceAddress = new Address(tokenBalances.balances[0].contractAddress);
326+
if (!balanceAddress.Equals(erc20Address))
327+
break;
328328

329329
decoratedFeeOptions[i] = new FeeOptionReturn(feeOptions.feeOptions[i],
330330
requiredBalance <= tokenBalances.balances[0].balance);

Packages/Sequence-Unity/Sequence/SequenceSDK/Ethereum/Chain.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ public enum Chain
6767
TestnetFrequency = 53716,
6868
TestnetIncentiv = 11690,
6969
TestnetIncentivV2 = 28802,
70+
TestnetSandbox = 6252,
7071

7172
TestnetXaiSepolia = -1, // Xai Sepolia's testnet's chain ID is too large to fit inside an int
7273

Packages/Sequence-Unity/Sequence/SequenceSDK/Ethereum/ChainDictionaries.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ public ChainConfig(Chain chain, string chainId, string name, string path, string
8686
new (Chain.TestnetFrequency, "53716", "Frequency Testnet", "frequency-testnet", "https://explorer.frequency.zeeve.net/", "BERA", "0x0000000000000000000000000000000000000000"),
8787
new (Chain.TestnetIncentiv, "11690", "Incentiv Testnet", "incentiv-testnet", "https://explorer.testnet.incentiv.net/", "CENT", "0x0000000000000000000000000000000000000000"),
8888
new (Chain.TestnetIncentivV2, "28802", "Incentiv Testnet v2", "incentiv-testnet-v2", "https://explorer.testnet.incentiv.net/", "TCENT", "0x0000000000000000000000000000000000000000"),
89+
new (Chain.TestnetSandbox, "6252", "Sandbox Testnet", "sandbox-testnet", "https://sandbox-testnet.explorer.caldera.xyz/", "SAND", "0x0000000000000000000000000000000000000000"),
8990
};
9091

9192
public static Dictionary<Chain, string> NameOf;

0 commit comments

Comments
 (0)