1
0
mirror of https://github.com/oceanprotocol-archive/squid-js.git synced 2024-02-02 15:31:51 +01:00

fixed token approve call

This commit is contained in:
Sebastian Gerske 2018-09-21 15:55:09 +02:00
parent 6e1fff2ed1
commit 90b0f662c3

View File

@ -87,7 +87,7 @@ export default class Ocean {
initialRequestEventHandler, accessCommittedEventHandler, tokenPublishedEventHandler) { initialRequestEventHandler, accessCommittedEventHandler, tokenPublishedEventHandler) {
const { token, market, auth } = this const { token, market, auth } = this
// Allow market contract to transfer funds on the consumer's behalf // Allow market contract to transfer funds on the consumer's behalf
token.approve(market.address, price, { from: senderAddress, gas: 2000000 }) token.contract.approve(market.address, price, { from: senderAddress, gas: 2000000 })
// Submit the access request // Submit the access request
auth.initiateAccessRequest( auth.initiateAccessRequest(
assetId, publisherId, publicKey, assetId, publisherId, publicKey,