Skip to content

Commit

Permalink
Fix method selector
Browse files Browse the repository at this point in the history
  • Loading branch information
kacpersaw committed Feb 7, 2023
1 parent 2243e58 commit e7d7857
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pkg/transactionparser/transaction_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func TestSpend(t *testing.T) {
copy(args.PublicKey[:], signing.Public(signer.PrivateKey()))
accAddress := core.ComputePrincipal(wallet.TemplateAddress, &args)

decodedTx, err := transactionparser.Parse(scale.NewDecoder(bytes.NewReader(rawTx)), rawTx, 1)
decodedTx, err := transactionparser.Parse(scale.NewDecoder(bytes.NewReader(rawTx)), rawTx, 16)
require.NoError(t, err)

require.Equal(t, testCase.gasPrice, decodedTx.GetGasPrice())
Expand Down
4 changes: 2 additions & 2 deletions pkg/transactionparser/v0/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
)

const (
methodSpawn = iota
methodSend
methodSpawn = 0
methodSend = 16
)

// ParseTransaction parses a transaction encoded in version 0.
Expand Down
2 changes: 1 addition & 1 deletion test/testserver/fake_node.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
)

const (
methodSend = 1
methodSend = 16
)

type meshServiceWrapper struct {
Expand Down

0 comments on commit e7d7857

Please sign in to comment.