mirror of
https://github.com/grassrootseconomics/cic-custodial.git
synced 2026-05-26 21:26:19 +02:00
feat: add transfer handler and input validation
* validate incoming api requests * fix transfer ABI encoder
This commit is contained in:
@@ -60,7 +60,7 @@ func TransferToken(
|
||||
return err
|
||||
}
|
||||
|
||||
input, err := abi.EncodeArgs(p.To, parseTransferValue(p.Amount, system.TokenDecimals))
|
||||
input, err := abi.EncodeArgs(w3.A(p.To), parseTransferValue(p.Amount, system.TokenDecimals))
|
||||
if err != nil {
|
||||
return fmt.Errorf("ABI encode failed %v: %w", err, asynq.SkipRetry)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user