From d8b9248bad203bae359f03a005c43aa19b13684e Mon Sep 17 00:00:00 2001 From: Sebastian Gerske Date: Fri, 5 Oct 2018 16:16:48 +0200 Subject: [PATCH] migrate to web3 --- src/keeper/Auth.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/keeper/Auth.ts b/src/keeper/Auth.ts index aa49dac..5e1eaf7 100644 --- a/src/keeper/Auth.ts +++ b/src/keeper/Auth.ts @@ -14,20 +14,20 @@ export default class OceanAuth extends ContractBaseWrapper { } public async getOrderStatus(orderId: string): Promise { - return this.contract.statusOfAccessRequest(orderId) + return this.contract.methods.statusOfAccessRequest(orderId) .call() .then((status: BigNumber) => status.toNumber()) } public async cancelAccessRequest(orderId: string, senderAddress: string): Promise { - return this.contract.cancelAccessRequest(orderId) + return this.contract.methods.cancelAccessRequest(orderId) .send({ from: senderAddress, }) } public async getEncryptedAccessToken(orderId: string, senderAddress: string): Promise { - return this.contract.getEncryptedAccessToken(orderId) + return this.contract.methods.getEncryptedAccessToken(orderId) .send({ from: senderAddress, }) @@ -35,7 +35,7 @@ export default class OceanAuth extends ContractBaseWrapper { public async initiateAccessRequest(asset: Asset, publicKey: string, timeout, buyerAddress: string): Promise { - return this.contract.initiateAccessRequest(asset.assetId, asset.publisherId, publicKey, timeout) + return this.contract.methods.initiateAccessRequest(asset.assetId, asset.publisherId, publicKey, timeout) .send({ from: buyerAddress, gas: this.config.defaultGas,