Skip to content

Commit

Permalink
Merge pull request #230 from hashgraph/fix/contract-bytes-32-array
Browse files Browse the repository at this point in the history
Fix `ContractFunctionParams.addBytes32Array()` selector
  • Loading branch information
mehcode authored Mar 25, 2020
2 parents f3f0a70 + 77c56e9 commit 7ccccf5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,7 @@ docs/

# Emacs
.log/

# Nix
shell.nix
.envrc
8 changes: 4 additions & 4 deletions __tests__/e2e/contract/Contract.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ describe("ContractCreateTransaction", () => {

let info = await new ContractInfoQuery()
.setContractId(contract)
.setMaxQueryPayment(new Hbar(1))
.setMaxQueryPayment(new Hbar(2))
.execute(client);

expect(info.contractId).toStrictEqual(contract);
Expand All @@ -69,7 +69,7 @@ describe("ContractCreateTransaction", () => {

const bytecode = await new ContractBytecodeQuery()
.setContractId(contract)
.setMaxQueryPayment(new Hbar(1))
.setMaxQueryPayment(new Hbar(2))
.execute(client);

expect(bytecode.length).toBe(798);
Expand Down Expand Up @@ -118,7 +118,7 @@ describe("ContractCreateTransaction", () => {

info = await new ContractInfoQuery()
.setContractId(contract)
.setMaxQueryPayment(new Hbar(1))
.setMaxQueryPayment(new Hbar(2))
.execute(client);

expect(info.contractId).toStrictEqual(contract);
Expand All @@ -138,7 +138,7 @@ describe("ContractCreateTransaction", () => {
try {
await new ContractInfoQuery()
.setContractId(contract)
.setMaxQueryPayment(new Hbar(1))
.setMaxQueryPayment(new Hbar(2))
.execute(client);
} catch {
errorThrown = true;
Expand Down
2 changes: 1 addition & 1 deletion src/contract/ContractFunctionParams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export class ContractFunctionParams {
}
}

this._selector.addBytes32();
this._selector.addBytes32Array();

return this._addParam(value, true);
}
Expand Down

0 comments on commit 7ccccf5

Please sign in to comment.