Skip to content

Commit

Permalink
override gas limit by default
Browse files Browse the repository at this point in the history
  • Loading branch information
dneilroth committed Jul 11, 2022
1 parent 3e9c8aa commit a0d7f45
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions services/construction/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,14 @@ func (a *APIService) ConstructionMetadata(
return nil, svcErrors.WrapErr(svcErrors.ErrGeth, err)
}

// by default, initialize gasLimit to the TransferGasLimit
gasLimit := polygon.TransferGasLimit
var gasLimit uint64
if input.GasLimit == nil {
// by default, initialize gasLimit to the TransferGasLimit
gasLimit = polygon.TransferGasLimit
} else {
gasLimit = input.GasLimit.Uint64()
}

to := checkTo
// Only work for ERC20 transfer
if len(input.TokenAddress) > 0 {
Expand Down

0 comments on commit a0d7f45

Please sign in to comment.