Skip to content

Commit

Permalink
issue-81 Fixed issue with transfer from not initialized account (#88)
Browse files Browse the repository at this point in the history
  • Loading branch information
Joltd authored Mar 12, 2023
1 parent 53a52b5 commit 75df066
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ public class WalletV4R2Contract private constructor(
validUntil: Instant,
vararg transfers: WalletTransfer
): Unit = coroutineScope {
val seqno = getSeqno()
val walletId = getSubWalletId()
val seqno = if (state !is AccountActive) 0 else getSeqno()
val walletId = if (state !is AccountActive) DEFAULT_WALLET_ID else getSubWalletId()
val message = createTransferMessage(
address = address,
stateInit = if (state !is AccountActive) createStateInit(privateKey.publicKey(), walletId) else null,
Expand Down

0 comments on commit 75df066

Please sign in to comment.