Merge pull request #868 from nspcc-dev/neo3/transaction/validUntilBlock

rpc: add validUntilBlock to transferNEP5
This commit is contained in:
Roman Khimov 2020-04-17 14:47:57 +03:00 committed by GitHub
commit 8556c828fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -113,6 +113,11 @@ func (c *Client) TransferNEP5(acc *wallet.Account, to util.Uint160, token *walle
Data: from.BytesBE(),
})
tx.ValidUntilBlock, err = c.CalculateValidUntilBlock()
if err != nil {
return util.Uint256{}, fmt.Errorf("can't calculate validUntilBlock: %v", err)
}
if err := request.AddInputsAndUnspentsToTx(tx, acc.Address, core.UtilityTokenID(), gas, c); err != nil {
return util.Uint256{}, fmt.Errorf("can't add GAS to transaction: %v", err)
}