node: fix deserialization issue for modify_message

This commit is contained in:
Conor Patrick 2023-03-23 22:00:34 +00:00
parent 24f3893b49
commit 50a5977baf
1 changed files with 3 additions and 3 deletions

View File

@ -179,9 +179,9 @@ func accountantModifyBalance(req *nodev1.AccountantModifyBalance, timestamp time
}
// uint256 has Bytes32 method for easier serialization
amount, ok := uint256.FromBig(amount_big)
if !ok {
return nil, errors.New("invalid amount")
amount, overflow := uint256.FromBig(amount_big)
if overflow {
return nil, errors.New("amount overflow")
}
tokenAdress := vaa.Address{}