ton-kotlin icon indicating copy to clipboard operation
ton-kotlin copied to clipboard

IllegalArgumentException if wallet in AccountUninit state

Open evgeny-lebedev-crypterium opened this issue 1 year ago • 0 comments

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)
    }