Skip to content

Commit 4d32923

Browse files
authored
Merge pull request #342 from 0xsequence/Fix/shop-boilerplate-native-tokens
2 parents d002e39 + f34b408 commit 4d32923

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

Packages/Sequence-Unity/Sequence/SequenceBoilerplates/Scripts/InGameShop/SequenceInGameShopState.cs

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,17 @@ private async Task UpdateSaleDetailsAsync()
8787
private async Task UpdatePaymentTokenAsync()
8888
{
8989
PaymentToken = await _saleContract.GetPaymentTokenAsync(_client);
90-
91-
var contract = new ERC20(PaymentToken);
92-
PaymentTokenSymbol = await contract.Symbol(_client);
93-
PaymentTokenDecimals = await contract.Decimals(_client);
90+
if (PaymentToken.IsZeroAddress())
91+
{
92+
PaymentTokenSymbol = ChainDictionaries.GasCurrencyOf[_chain];
93+
PaymentTokenDecimals = 18;
94+
}
95+
else
96+
{
97+
var contract = new ERC20(PaymentToken);
98+
PaymentTokenSymbol = await contract.Symbol(_client);
99+
PaymentTokenDecimals = await contract.Decimals(_client);
100+
}
94101

95102
await UserPaymentTokenBalanceAsync();
96103
}

Packages/Sequence-Unity/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "xyz.0xsequence.waas-unity",
3-
"version": "4.6.6",
3+
"version": "4.6.7",
44
"displayName": "Sequence Embedded Wallet SDK",
55
"description": "A Unity SDK for Sequence APIs",
66
"unity": "2021.3",

0 commit comments

Comments
 (0)