diff --git a/android/app/src/androidTest/java/com/trustwallet/core/app/blockchains/theopennetwork/TestTheOpenNetworkSigner.kt b/android/app/src/androidTest/java/com/trustwallet/core/app/blockchains/theopennetwork/TestTheOpenNetworkSigner.kt index 6fb0edc455c..59b3fcdd465 100644 --- a/android/app/src/androidTest/java/com/trustwallet/core/app/blockchains/theopennetwork/TestTheOpenNetworkSigner.kt +++ b/android/app/src/androidTest/java/com/trustwallet/core/app/blockchains/theopennetwork/TestTheOpenNetworkSigner.kt @@ -25,7 +25,6 @@ class TestTheOpenNetworkSigner { val privateKey = PrivateKey("c38f49de2fb13223a9e7d37d5d0ffbdd89a5eb7c8b0ee4d1c299f2cefe7dc4a0".toHexByteArray()) val transfer = TheOpenNetwork.Transfer.newBuilder() - .setWalletVersion(TheOpenNetwork.WalletVersion.WALLET_V4_R2) .setDest("EQBm--PFwDv1yCeS-QTJ-L8oiUpqo9IT1BwgVptlSq3ts90Q") .setAmount(10) .setMode(TheOpenNetwork.SendMode.PAY_FEES_SEPARATELY_VALUE or TheOpenNetwork.SendMode.IGNORE_ACTION_PHASE_ERRORS_VALUE) @@ -37,6 +36,7 @@ class TestTheOpenNetworkSigner { .addMessages(transfer) .setSequenceNumber(6) .setExpireAt(1671132440) + .setWalletVersion(TheOpenNetwork.WalletVersion.WALLET_V4_R2) .build() val output = AnySigner.sign(input, CoinType.TON, SigningOutput.parser()) @@ -59,7 +59,6 @@ class TestTheOpenNetworkSigner { .build() val transfer = TheOpenNetwork.Transfer.newBuilder() - .setWalletVersion(TheOpenNetwork.WalletVersion.WALLET_V4_R2) .setDest("EQBiaD8PO1NwfbxSkwbcNT9rXDjqhiIvXWymNO-edV0H5lja") .setAmount(100 * 1000 * 1000) .setMode(TheOpenNetwork.SendMode.PAY_FEES_SEPARATELY_VALUE or TheOpenNetwork.SendMode.IGNORE_ACTION_PHASE_ERRORS_VALUE) @@ -72,6 +71,7 @@ class TestTheOpenNetworkSigner { .addMessages(transfer) .setSequenceNumber(1) .setExpireAt(1787693046) + .setWalletVersion(TheOpenNetwork.WalletVersion.WALLET_V4_R2) .build() val output = AnySigner.sign(input, CoinType.TON, SigningOutput.parser()) @@ -103,7 +103,6 @@ class TestTheOpenNetworkSigner { .build() val transfer = TheOpenNetwork.Transfer.newBuilder() - .setWalletVersion(TheOpenNetwork.WalletVersion.WALLET_V4_R2) .setDest(dogeChatbotDeployingAddress) // 0.069 TON .setAmount(69_000_000) @@ -116,6 +115,7 @@ class TestTheOpenNetworkSigner { .addMessages(transfer) .setSequenceNumber(4) .setExpireAt(1721939714) + .setWalletVersion(TheOpenNetwork.WalletVersion.WALLET_V4_R2) .build() val output = AnySigner.sign(input, CoinType.TON, SigningOutput.parser()) diff --git a/swift/Tests/Blockchains/TheOpenNetworkTests.swift b/swift/Tests/Blockchains/TheOpenNetworkTests.swift index 716d5fd8b9c..f27e3a2fbd8 100644 --- a/swift/Tests/Blockchains/TheOpenNetworkTests.swift +++ b/swift/Tests/Blockchains/TheOpenNetworkTests.swift @@ -82,7 +82,6 @@ class TheOpenNetworkTests: XCTestCase { let privateKeyData = Data(hexString: "c38f49de2fb13223a9e7d37d5d0ffbdd89a5eb7c8b0ee4d1c299f2cefe7dc4a0")! let transfer = TheOpenNetworkTransfer.with { - $0.walletVersion = TheOpenNetworkWalletVersion.walletV4R2 $0.dest = "EQBm--PFwDv1yCeS-QTJ-L8oiUpqo9IT1BwgVptlSq3ts90Q" $0.amount = 10 $0.mode = UInt32(TheOpenNetworkSendMode.payFeesSeparately.rawValue | TheOpenNetworkSendMode.ignoreActionPhaseErrors.rawValue) @@ -94,6 +93,7 @@ class TheOpenNetworkTests: XCTestCase { $0.privateKey = privateKeyData $0.sequenceNumber = 6 $0.expireAt = 1671132440 + $0.walletVersion = TheOpenNetworkWalletVersion.walletV4R2 } let output: TheOpenNetworkSigningOutput = AnySigner.sign(input: input, coin: .ton) @@ -115,7 +115,6 @@ class TheOpenNetworkTests: XCTestCase { } let transfer = TheOpenNetworkTransfer.with { - $0.walletVersion = TheOpenNetworkWalletVersion.walletV4R2 $0.dest = "EQBiaD8PO1NwfbxSkwbcNT9rXDjqhiIvXWymNO-edV0H5lja" $0.amount = 100 * 1000 * 1000 $0.mode = UInt32(TheOpenNetworkSendMode.payFeesSeparately.rawValue | TheOpenNetworkSendMode.ignoreActionPhaseErrors.rawValue) @@ -129,6 +128,7 @@ class TheOpenNetworkTests: XCTestCase { $0.privateKey = privateKeyData $0.sequenceNumber = 1 $0.expireAt = 1787693046 + $0.walletVersion = TheOpenNetworkWalletVersion.walletV4R2 } let output: TheOpenNetworkSigningOutput = AnySigner.sign(input: input, coin: .ton) @@ -159,7 +159,6 @@ class TheOpenNetworkTests: XCTestCase { } let transfer = TheOpenNetworkTransfer.with { - $0.walletVersion = TheOpenNetworkWalletVersion.walletV4R2 $0.dest = dogeChatbotDeployingAddress // 0.069 TON $0.amount = 69_000_000 @@ -173,6 +172,7 @@ class TheOpenNetworkTests: XCTestCase { $0.privateKey = privateKeyData $0.sequenceNumber = 4 $0.expireAt = 1721939714 + $0.walletVersion = TheOpenNetworkWalletVersion.walletV4R2 } let output: TheOpenNetworkSigningOutput = AnySigner.sign(input: input, coin: .ton) diff --git a/tests/chains/TheOpenNetwork/TWAnySignerTests.cpp b/tests/chains/TheOpenNetwork/TWAnySignerTests.cpp index c108c09bcdf..9a9ea9e3ade 100644 --- a/tests/chains/TheOpenNetwork/TWAnySignerTests.cpp +++ b/tests/chains/TheOpenNetwork/TWAnySignerTests.cpp @@ -15,8 +15,6 @@ namespace TW::TheOpenNetwork::tests { TEST(TWAnySignerTheOpenNetwork, SingMessageToTransferAndDeployWalletV4R2) { Proto::SigningInput input; - input.set_wallet_version(Proto::WALLET_V4_R2); - auto& transfer = *input.add_messages(); transfer.set_dest("EQDYW_1eScJVxtitoBRksvoV9cCYo4uKGWLVNIHB1JqRR3n0"); transfer.set_amount(10); @@ -28,6 +26,8 @@ TEST(TWAnySignerTheOpenNetwork, SingMessageToTransferAndDeployWalletV4R2) { input.set_expire_at(1671135440); + input.set_wallet_version(Proto::WALLET_V4_R2); + Proto::SigningOutput output; ANY_SIGN(input, TWCoinTypeTON); @@ -40,8 +40,6 @@ TEST(TWAnySignerTheOpenNetwork, SingMessageToTransferAndDeployWalletV4R2) { TEST(TWAnySignerTheOpenNetwork, SingMessageToTransferAndDeployWalletV5R1) { Proto::SigningInput input; - input.set_wallet_version(Proto::WALLET_V5_R1); - auto& transfer = *input.add_messages(); transfer.set_dest("EQBe6DtCpJZe8M4t-crMXe93JlEYgSl30S5OUuMSLOfeQfBu"); transfer.set_amount(10); @@ -53,6 +51,8 @@ TEST(TWAnySignerTheOpenNetwork, SingMessageToTransferAndDeployWalletV5R1) { input.set_expire_at(0xffffffff); + input.set_wallet_version(Proto::WALLET_V5_R1); + Proto::SigningOutput output; ANY_SIGN(input, TWCoinTypeTON); diff --git a/wasm/tests/Blockchain/TheOpenNetwork.test.ts b/wasm/tests/Blockchain/TheOpenNetwork.test.ts index 6da95ff578c..b96cb551675 100644 --- a/wasm/tests/Blockchain/TheOpenNetwork.test.ts +++ b/wasm/tests/Blockchain/TheOpenNetwork.test.ts @@ -71,7 +71,6 @@ describe("TheOpenNetwork", () => { let privateKeyData = HexCoding.decode("c38f49de2fb13223a9e7d37d5d0ffbdd89a5eb7c8b0ee4d1c299f2cefe7dc4a0"); let transfer = TW.TheOpenNetwork.Proto.Transfer.create({ - walletVersion: TW.TheOpenNetwork.Proto.WalletVersion.WALLET_V4_R2, dest: "EQBm--PFwDv1yCeS-QTJ-L8oiUpqo9IT1BwgVptlSq3ts90Q", amount: new Long(10), mode: (TW.TheOpenNetwork.Proto.SendMode.PAY_FEES_SEPARATELY | TW.TheOpenNetwork.Proto.SendMode.IGNORE_ACTION_PHASE_ERRORS), @@ -83,6 +82,7 @@ describe("TheOpenNetwork", () => { privateKey: PrivateKey.createWithData(privateKeyData).data(), sequenceNumber: 6, expireAt: 1671132440, + walletVersion: TW.TheOpenNetwork.Proto.WalletVersion.WALLET_V4_R2, }); const encoded = TW.TheOpenNetwork.Proto.SigningInput.encode(input).finish(); @@ -108,7 +108,6 @@ describe("TheOpenNetwork", () => { }); let transfer = TW.TheOpenNetwork.Proto.Transfer.create({ - walletVersion: TW.TheOpenNetwork.Proto.WalletVersion.WALLET_V4_R2, dest: "EQBiaD8PO1NwfbxSkwbcNT9rXDjqhiIvXWymNO-edV0H5lja", amount: new Long(100 * 1000 * 1000), mode: (TW.TheOpenNetwork.Proto.SendMode.PAY_FEES_SEPARATELY | TW.TheOpenNetwork.Proto.SendMode.IGNORE_ACTION_PHASE_ERRORS), @@ -122,6 +121,7 @@ describe("TheOpenNetwork", () => { privateKey: PrivateKey.createWithData(privateKeyData).data(), sequenceNumber: 1, expireAt: 1787693046, + walletVersion: TW.TheOpenNetwork.Proto.WalletVersion.WALLET_V4_R2, }); const encoded = TW.TheOpenNetwork.Proto.SigningInput.encode(input).finish();