Skip to content
This repository has been archived by the owner on Feb 23, 2023. It is now read-only.

Commit

Permalink
index: Don't perform contract calls twice (#76)
Browse files Browse the repository at this point in the history
The `call` method accidentally called `ethereum.call()` twice. The
second time is unnecessary as the result is already available from the
first call.
  • Loading branch information
Jannis committed Sep 20, 2019
1 parent 6a8029e commit a8c33a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1408,7 +1408,7 @@ export class SmartContract {
name +
'` to handle this in the mapping.',
)
return ethereum.call(call) as Array<EthereumValue>
return result as Array<EthereumValue>
}

tryCall(name: string, params: Array<EthereumValue>): CallResult<Array<EthereumValue>> {
Expand Down

0 comments on commit a8c33a1

Please sign in to comment.