Skip to content

Commit

Permalink
update coins field in executeReadOnlyCall
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben-Rey committed May 28, 2024
1 parent 45d6b0b commit aa06841
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion packages/massa-web3/open_rpc/massa.api.json
Original file line number Diff line number Diff line change
Expand Up @@ -3142,7 +3142,7 @@
"type": "array",
"items": {
"format": "byte",
"type": "string"
"type": "number"
}
},
"Error": {
Expand Down
5 changes: 2 additions & 3 deletions packages/massa-web3/src/experimental/client/publicAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export class PublicAPI {
target_function: params.func,
parameter: params.parameter ? Array.from(params.parameter) : [],
caller_address: params.caller.toString(),
coins: params.coins ? Mas.toString(params.coins) : null,
coins: params.coins ? params.coins.toString() : null,
fee: params.fee ? Mas.toString(params.fee) : null,
},
])
Expand All @@ -103,8 +103,7 @@ export class PublicAPI {
}

return {
// @ts-expect-error - wrong type returned by the API interface
value: new Uint8Array(res.result.Ok),
value: new Uint8Array(res.result.Ok || []),
info: {
gasCost: res.gas_cost,
error: res.result.Error,
Expand Down
17 changes: 9 additions & 8 deletions packages/massa-web3/src/experimental/generated/client.ts

Large diffs are not rendered by default.

1 comment on commit aa06841

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage report for experimental massa-web3

St.
Category Percentage Covered / Total
🟢 Statements 83.81% 911/1087
🟡 Branches 73.87% 164/222
🟢 Functions 84.21% 176/209
🟢 Lines 83.96% 911/1085

Test suite run success

118 tests passing in 12 suites.

Report generated by 🧪jest coverage report action from aa06841

Please sign in to comment.