Skip to content

Commit

Permalink
Merge branch 'master' into add-func-for-token-2022-address
Browse files Browse the repository at this point in the history
  • Loading branch information
satoshiotomakan authored Sep 5, 2024
2 parents 1e5bbfc + 136506f commit 4e92398
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class TestLiquidStaking {
stake = LiquidStaking.Stake.newBuilder().apply {
amount = "1000000000000000000"
asset = LiquidStaking.Asset.newBuilder().apply {
stakingToken = LiquidStaking.Coin.MATIC
stakingToken = LiquidStaking.Coin.POL
}.build()
}.build()
}
Expand Down
2 changes: 1 addition & 1 deletion docs/registry.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ This list is generated from [./registry.json](../registry.json)
| 889 | Viction | VIC | <img src="https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/viction/info/logo.png" width="32" /> | <https://www.viction.xyz/> |
| 899 | eCash | XEC | <img src="https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ecash/info/logo.png" width="32" /> | <https://e.cash> |
| 931 | THORChain | RUNE | <img src="https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/thorchain/info/logo.png" width="32" /> | <https://thorchain.org> |
| 966 | Polygon | MATIC | <img src="https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/polygon/info/logo.png" width="32" /> | <https://polygon.technology> |
| 966 | Polygon | POL | <img src="https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/polygon/info/logo.png" width="32" /> | <https://polygon.technology> |
| 996 | OKX Chain | OKT | <img src="https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/okc/info/logo.png" width="32" /> | <https://www.okx.com/okc> |
| 999 | Bitcoin Diamond | BCD | <img src="https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/bitcoindiamond/info/logo.png" width="32" /> | <https://www.bitcoindiamond.org> |
| 1001 | ThunderCore | TT | <img src="https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/thundertoken/info/logo.png" width="32" /> | <https://thundercore.com> |
Expand Down
6 changes: 3 additions & 3 deletions registry.json
Original file line number Diff line number Diff line change
Expand Up @@ -3108,7 +3108,7 @@
"id": "polygon",
"name": "Polygon",
"coinId": 966,
"symbol": "MATIC",
"symbol": "POL",
"decimals": 18,
"blockchain": "Ethereum",
"derivation": [
Expand All @@ -3129,9 +3129,9 @@
},
"info": {
"url": "https://polygon.technology",
"source": "https://github.com/maticnetwork/contracts",
"source": "https://github.com/maticnetwork",
"rpc": "https://polygon-rpc.com",
"documentation": "https://eth.wiki/json-rpc/API"
"documentation": "https://docs.polygon.technology"
}
},
{
Expand Down
3 changes: 2 additions & 1 deletion src/proto/LiquidStaking.proto
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ import "Aptos.proto";

// Enum for supported coins for liquid staking
enum Coin {
MATIC = 0;
// Previously, MATIC.
POL = 0;
ATOM = 1;
BNB = 2;
APT = 3;
Expand Down
2 changes: 1 addition & 1 deletion swift/Tests/LiquidStakingTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class LiquidStakingTests: XCTestCase {
$0.stake = LiquidStakingStake.with {
$0.amount = "1000000000000000000"
$0.asset = LiquidStakingAsset.with {
$0.stakingToken = .matic
$0.stakingToken = .pol
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion tests/chains/Polygon/TWCoinTypeTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ TEST(TWPolygonCoinType, TWCoinType) {
ASSERT_EQ(TWBlockchainEthereum, TWCoinTypeBlockchain(TWCoinTypePolygon));
ASSERT_EQ(0x0, TWCoinTypeP2shPrefix(TWCoinTypePolygon));
ASSERT_EQ(0x0, TWCoinTypeStaticPrefix(TWCoinTypePolygon));
assertStringsEqual(symbol, "MATIC");
assertStringsEqual(symbol, "POL");
assertStringsEqual(txUrl, "https://polygonscan.com/tx/0xe26ed1470d5bf99a53d687843e7acdf7e4ba6620af93b4d672e714de90476e8e");
assertStringsEqual(accUrl, "https://polygonscan.com/address/0x720E1fa107A1Df39Db4E78A3633121ac36Bec132");
assertStringsEqual(id, "polygon");
Expand Down
10 changes: 5 additions & 5 deletions tests/common/LiquidStaking/LiquidStakingTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ namespace TW::LiquidStaking::tests {
input.set_protocol(Proto::Strader);
Proto::Stake stake;
Proto::Asset asset;
asset.set_staking_token(Proto::MATIC);
asset.set_staking_token(Proto::POL);
*stake.mutable_asset() = asset;
stake.set_amount("1000000000000000000");
*input.mutable_stake() = stake;
Expand All @@ -80,14 +80,14 @@ namespace TW::LiquidStaking::tests {
ASSERT_EQ(ls_output.status().code(), Proto::ERROR_TARGETED_BLOCKCHAIN_NOT_SUPPORTED_BY_PROTOCOL);
}

TEST(LiquidStaking, PolygonStraderStakeMatic) {
TEST(LiquidStaking, PolygonStraderStakePol) {
Proto::Input input;
input.set_blockchain(Proto::POLYGON);
input.set_protocol(Proto::Strader);
input.set_smart_contract_address("0xfd225c9e6601c9d38d8f98d8731bf59efcf8c0e3");
Proto::Stake stake;
Proto::Asset asset;
asset.set_staking_token(Proto::MATIC);
asset.set_staking_token(Proto::POL);
*stake.mutable_asset() = asset;
stake.set_amount("1000000000000000000");
*input.mutable_stake() = stake;
Expand Down Expand Up @@ -146,7 +146,7 @@ namespace TW::LiquidStaking::tests {
}
}

TEST(LiquidStaking, PolygonStraderUnStakeMatic) {
TEST(LiquidStaking, PolygonStraderUnStakePol) {
Proto::Input input;
input.set_blockchain(Proto::POLYGON);
input.set_protocol(Proto::Strader);
Expand Down Expand Up @@ -184,7 +184,7 @@ namespace TW::LiquidStaking::tests {
// Successfully broadcasted https://polygonscan.com/tx/0xa66855e4af8e654e458915f59acd77e88706c01b59a3e4aed1363a665458368a
}

TEST(LiquidStaking, PolygonStraderWithdrawMatic) {
TEST(LiquidStaking, PolygonStraderWithdrawPol) {
Proto::Input input;
input.set_blockchain(Proto::POLYGON);
input.set_protocol(Proto::Strader);
Expand Down

0 comments on commit 4e92398

Please sign in to comment.