Skip to content

Commit

Permalink
Fix naming convention
Browse files Browse the repository at this point in the history
  • Loading branch information
vivekjain23 committed Jul 11, 2024
1 parent 6a73360 commit d347d59
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions packages/evm/evmtest/wiki_how_tos/how_tos_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,18 +133,19 @@ func TestTakeAllowance(t *testing.T) {
allowanceInstance := env.DeployContract(privateKey, AllowanceContractABI, AllowanceContractBytecode)

// creating nft ID
NFT_ID_Buffer := bytes.NewBufferString("0x0000000000000000000000000000000000000000000000000000000000000001")
NFT_ID := [32]byte(NFT_ID_Buffer.Bytes())
NftIdBuffer := bytes.NewBufferString("0x0000000000000000000000000000000000000000000000000000000000000001")

Check failure on line 136 in packages/evm/evmtest/wiki_how_tos/how_tos_test.go

View workflow job for this annotation

GitHub Actions / Lint

var-naming: var NftIdBuffer should be NftIDBuffer (revive)
nftId := [32]byte(NftIdBuffer.Bytes())

Check failure on line 137 in packages/evm/evmtest/wiki_how_tos/how_tos_test.go

View workflow job for this annotation

GitHub Actions / Lint

var-naming: var nftId should be nftID (revive)

// allowing funds
result, err := allowanceInstance.CallFn(nil, "allow", deployer, NFT_ID)
result, err := allowanceInstance.CallFn(nil, "allow", deployer, nftId)
assert.Nil(t, err)

t.Log("****************************", result, err)
t.Log("Allow :", result, err)

takeAllowanceInstance := env.DeployContract(privateKey, TakeAllowanceContractABI, TakeAllowanceContractBytecode)

// taking allowed funds
takeAllowanceInstance.CallFn(nil, "takeAllowedFunds", deployer, NFT_ID)
takeAllowanceInstance.CallFn(nil, "takeAllowedFunds", deployer, nftId)
assert.Nil(t, err)
t.Log("Take Allowed funds :", result, err)
}

0 comments on commit d347d59

Please sign in to comment.