ton-kotlin
ton-kotlin copied to clipboard
IllegalArgumentException if wallet in AccountUninit state
WalletV4R2Contract Method getSeqno() failed with Exception if wallet is not AccountActive
public suspend fun transfer(...): Unit = coroutineScope {
val seqno = getSeqno()
val walletId = getSubWalletId()
val message = createTransferMessage(
address = address,
stateInit = if (state !is AccountActive) createStateInit(privateKey.publicKey(), walletId) else null,
...
)
sendExternalMessage(liteApi, message)
}