-
Notifications
You must be signed in to change notification settings - Fork 530
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Enable new token discovery service, add Amoy testnet * Add Base networks (#3378) * Fix for not taking gas limit from Wallet Connect tx (#3379)
- Loading branch information
1 parent
e920b46
commit f3eedb5
Showing
34 changed files
with
598 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
app/src/main/java/com/alphawallet/app/entity/okx/OkProtocolType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package com.alphawallet.app.entity.okx; | ||
|
||
import com.alphawallet.app.entity.ContractType; | ||
|
||
public enum OkProtocolType | ||
{ | ||
ERC_20("token_20"), | ||
ERC_721("token_721"), | ||
ERC_1155("token_1155"); | ||
|
||
private final String type; | ||
|
||
OkProtocolType(String type) | ||
{ | ||
this.type = type; | ||
} | ||
|
||
public static ContractType getStandardType(OkProtocolType type) | ||
{ | ||
switch (type) | ||
{ | ||
case ERC_20 -> | ||
{ | ||
return ContractType.ERC20; | ||
} | ||
case ERC_721 -> | ||
{ | ||
return ContractType.ERC721; | ||
} | ||
case ERC_1155 -> | ||
{ | ||
return ContractType.ERC1155; | ||
} | ||
} | ||
|
||
return ContractType.ERC20; | ||
} | ||
|
||
public String getValue() | ||
{ | ||
return type; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
app/src/main/java/com/alphawallet/app/entity/okx/OkToken.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package com.alphawallet.app.entity.okx; | ||
|
||
import com.alphawallet.app.entity.tokens.TokenInfo; | ||
import com.google.gson.annotations.Expose; | ||
import com.google.gson.annotations.SerializedName; | ||
|
||
public class OkToken | ||
{ | ||
@SerializedName("symbol") | ||
@Expose | ||
public String symbol; | ||
|
||
@SerializedName("tokenContractAddress") | ||
@Expose | ||
public String tokenContractAddress; | ||
|
||
@SerializedName("holdingAmount") | ||
@Expose | ||
public String holdingAmount; | ||
|
||
@SerializedName("priceUsd") | ||
@Expose | ||
public String priceUsd; | ||
|
||
@SerializedName("tokenId") | ||
@Expose | ||
public String tokenId; | ||
|
||
public TokenInfo createInfo(long chainId) | ||
{ | ||
return new TokenInfo(tokenContractAddress, "", symbol, 0, true, chainId); | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
app/src/main/java/com/alphawallet/app/entity/okx/OkTokenCheck.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.alphawallet.app.entity.okx; | ||
|
||
public class OkTokenCheck | ||
{ | ||
public final long chainId; | ||
public final OkProtocolType type; | ||
|
||
public OkTokenCheck(long chainId, OkProtocolType type) | ||
{ | ||
this.chainId = chainId; | ||
this.type = type; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.