Skip to content

Commit

Permalink
minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
neodiX committed Sep 3, 2024
1 parent 009b804 commit e65bf24
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,10 @@ public Message prepareDeployMsg(WalletV5Config conf) {
.dstAddr(getAddressIntStd())
.build())
.init(getStateInit())
// .body(CellBuilder.beginCell()
// .storeBytes(Utils.signData(keyPair.getPublicKey(), keyPair.getSecretKey(), body.hash()))
// .storeCell(body)
// .endCell())
.body(body)
.body(CellBuilder.beginCell()
.storeCell(body)
.storeBytes(Utils.signData(keyPair.getPublicKey(), keyPair.getSecretKey(), body.hash()))
.endCell())
.build();
}

Expand All @@ -132,18 +131,14 @@ public Message prepareExternalMsg(WalletV5Config config) {
}

public Cell createTransferBody(WalletV5Config config) {
Cell body = CellBuilder.beginCell()
return CellBuilder.beginCell()
.storeUint(0x7369676e, 32)
.storeUint(config.getWalletId(), SIZE_WALLET_ID)
.storeUint((config.getValidUntil() == 0) ? Instant.now().getEpochSecond() + 60 : config.getValidUntil(), SIZE_VALID_UNTIL)
.storeUint(config.getSeqno(), SIZE_SEQNO)
// .storeCell(storeWalletActions(config.getExtensions())) // innerRequest
.storeBit(false) // for now empty
.endCell();

return CellBuilder.beginCell()
.storeCell(body)
.storeBytes(Utils.signData(keyPair.getPublicKey(), keyPair.getSecretKey(), body.hash())).endCell();
}

private Cell storeWalletActions(WalletActions walletActions) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import static org.assertj.core.api.AssertionsForClassTypes.assertThat;

@Slf4j
public class TestWalletV5Extensions extends CommonTest {
public class TestWalletV5 extends CommonTest {
// TonHashMapE x = new TonHashMapE(10);
// Address addr1 = Address.of("0:2cf55953e92efbeadab7ba725c3f93a0b23f842cbba72d7b8e6f510a70e422e3");
// Address addr2 = Address.of("0:0000000000000000000000000000000000000000000000000000000000000000");
Expand Down

0 comments on commit e65bf24

Please sign in to comment.