From a2368e6ed3f8f621b0358efd1e29827143125b0e Mon Sep 17 00:00:00 2001 From: satello Date: Wed, 18 Apr 2018 10:25:55 -0700 Subject: [PATCH] feat: add getDataFromStore to abstractions/Arbitrable --- src/contracts/abstractions/Arbitrable.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/contracts/abstractions/Arbitrable.js b/src/contracts/abstractions/Arbitrable.js index 791f242..747bb5a 100644 --- a/src/contracts/abstractions/Arbitrable.js +++ b/src/contracts/abstractions/Arbitrable.js @@ -139,6 +139,20 @@ class ArbitrableContract extends AbstractContract { return partyAEvidence.concat(partyBEvidence) } + /** + * Fetch all data from the store on the current contract. + * @returns {object} - Store data for contract. + */ + getDataFromStore = async () => { + const contractInstance = await this._contractImplementation.loadContract() + const partyA = await contractInstance.partyA() + + return this._StoreProvider.getContractByAddress( + partyA, + this._contractImplementation.contractAddress + ) + } + /** * Get data from the store and contract for Arbitrable Contract. * @param {string} account - ETH address of user.