Skip to content
This repository has been archived by the owner on Jun 30, 2022. It is now read-only.

Commit

Permalink
feat(contract): convert wei amount to eth
Browse files Browse the repository at this point in the history
  • Loading branch information
n1c01a5 committed Nov 13, 2018
1 parent b729e73 commit 987f63a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "kleros-api-2",
"version": "0.18.9",
"version": "0.18.11",
"description": "A Javascript library that makes it easy to build relayers and other DApps that use the Kleros protocol.",
"keywords": [
"Blockchain",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,14 @@ class MultipleArbitrableTransaction extends Arbitrable {
await this.loadContract()

try {
return this.contractInstance.pay(arbitrableTransactionId, amount, {
from: account,
value: 0
})
return this.contractInstance.pay(
arbitrableTransactionId,
this._Web3Wrapper.fromWei(amount, 'ether'),
{
from: account,
value: 0
}
)
} catch (err) {
console.error(err)
throw new Error(errorConstants.UNABLE_TO_PAY_SELLER)
Expand All @@ -116,10 +120,14 @@ class MultipleArbitrableTransaction extends Arbitrable {
await this.loadContract()

try {
return this.contractInstance.reimburse(arbitrableTransactionId, amount, {
from: account,
value: 0
})
return this.contractInstance.reimburse(
arbitrableTransactionId,
this._Web3Wrapper.fromWei(amount, 'ether'),
{
from: account,
value: 0
}
)
} catch (err) {
console.error(err)
throw new Error(errorConstants.UNABLE_TO_REIMBURSE_BUYER)
Expand Down

0 comments on commit 987f63a

Please sign in to comment.