Skip to content

Commit

Permalink
apply changes from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
Vvaradinov committed Nov 20, 2023
1 parent f880f5d commit b007b8e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions precompiles/werc20/werc20.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,10 @@ func (p Precompile) Run(evm *vm.EVM, contract *vm.Contract, readOnly bool) (bz [
defer cmn.HandleGasError(ctx, contract, initialGas, &err)()

switch {
case method == nil:
// If there is no method specified, then it's the fallback or receive case
bz, err = p.Deposit(ctx, contract, stateDB, method, args)
case method.Name == cmn.FallbackMethod, method.Name == cmn.ReceiveMethod, method.Name == DepositMethod:
case method == nil,
method.Name == cmn.FallbackMethod,
method.Name == cmn.ReceiveMethod,
method.Name == DepositMethod:
// WERC20 transactions
bz, err = p.Deposit(ctx, contract, stateDB, method, args)
case method.Name == WithdrawMethod:
Expand Down

0 comments on commit b007b8e

Please sign in to comment.