Skip to content
Permalink
Browse files

fix(StoreProviderWrapper): revert to passing named params for addEvid…

…enceContract
  • Loading branch information...
satello committed Apr 10, 2018
1 parent 8a3e838 commit fc614441501063a377ba348928f11e1d641c25f8
Showing with 16 additions and 8 deletions.
  1. +3 −5 src/contracts/abstractions/Arbitrable.js
  2. +13 −3 src/utils/StoreProviderWrapper.js
@@ -84,11 +84,9 @@ class ArbitrableContract extends AbstractContract {
await this._StoreProvider.addEvidenceContract(
this._contractImplementation.contractAddress,
account,
{
name,
description,
url
}
name,
description,
url
)

return txHash
@@ -271,18 +271,28 @@ class StoreProviderWrapper {
* stored evidence for the specified user, not all parties of the dispute.
* @param {string} contractAddress - Address of the contract
* @param {string} userAddress - Address of the user.
* @param {object} params - Specifics of the evidence. Should include name, description and url.
* @param {string} name - Name of evidence.
* @param {string} description - Description of evidence.
* @param {string} url - A link to the evidence.
* @returns {Promise} - The resulting evidence data.
*/
addEvidenceContract = (contractAddress, userAddress, params) => {
addEvidenceContract = (
contractAddress,
userAddress,
name,
description,
url
) => {
// get timestamp for submission
const submittedAt = new Date().getTime()

const getBodyFn = () =>
new Promise(resolve =>
resolve(
JSON.stringify({
...params,
name,
description,
url,
submittedAt
})
)

0 comments on commit fc61444

Please sign in to comment.
You can’t perform that action at this time.