Skip to content

Commit 6c4872d

Browse files
committed
Adding useGSN into new profile calls
1 parent 0801864 commit 6c4872d

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "lightstreams-js-sdk",
3-
"version": "0.16.1",
3+
"version": "0.16.2",
44
"description": "Lightstreams JS SDK for building mainstream DApps with support for Programmable Decentralized Private Storage.",
55
"author": "Gabriel Garrido",
66
"contributors": [

src/contracts/profile.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ module.exports.transferArtistTokens = (web3, {from, beneficiary, contractAddr, a
238238
});
239239
};
240240

241-
module.exports.hatchArtistToken = async (web3, {from, contractAddr, artistTokenAddr, wphtAddr, amountInPht}) => {
241+
module.exports.hatchArtistToken = async (web3, {from, contractAddr, artistTokenAddr, wphtAddr, amountInPht, useGSN}) => {
242242

243243
Web3Wrapper.validator.validateAddress("from", from);
244244
Web3Wrapper.validator.validateAddress("wphtAddr", wphtAddr);
@@ -250,6 +250,7 @@ module.exports.hatchArtistToken = async (web3, {from, contractAddr, artistTokenA
250250
to: contractAddr,
251251
abi: profileScJSON.abi,
252252
method: 'hatchArtistToken',
253+
useGSN,
253254
params: [artistTokenAddr, wphtAddr, Web3Wrapper.utils.toWei(amountInPht), true]
254255
});
255256

@@ -262,7 +263,7 @@ module.exports.hatchArtistToken = async (web3, {from, contractAddr, artistTokenA
262263
return Web3Wrapper.utils.toBN(tokens);
263264
};
264265

265-
module.exports.claimArtistToken = async (web3, {from, contractAddr, artistTokenAddr}) => {
266+
module.exports.claimArtistToken = async (web3, {from, contractAddr, artistTokenAddr, useGSN}) => {
266267

267268
Web3Wrapper.validator.validateAddress("from", from);
268269
Web3Wrapper.validator.validateAddress("contractAddr", contractAddr);
@@ -273,6 +274,7 @@ module.exports.claimArtistToken = async (web3, {from, contractAddr, artistTokenA
273274
to: contractAddr,
274275
abi: profileScJSON.abi,
275276
method: 'claimArtistToken',
277+
useGSN,
276278
params: [artistTokenAddr]
277279
});
278280

@@ -285,7 +287,7 @@ module.exports.claimArtistToken = async (web3, {from, contractAddr, artistTokenA
285287
return Web3Wrapper.utils.toBN(tokens);
286288
};
287289

288-
module.exports.refundArtistToken = async (web3, {from, contractAddr, artistTokenAddr, wphtAddr}) => {
290+
module.exports.refundArtistToken = async (web3, {from, contractAddr, artistTokenAddr, wphtAddr, useGSN}) => {
289291

290292
Web3Wrapper.validator.validateAddress("from", from);
291293
Web3Wrapper.validator.validateAddress("contractAddr", contractAddr);
@@ -297,6 +299,7 @@ module.exports.refundArtistToken = async (web3, {from, contractAddr, artistToken
297299
to: contractAddr,
298300
abi: profileScJSON.abi,
299301
method: 'refundArtistToken',
302+
useGSN,
300303
params: [artistTokenAddr, wphtAddr]
301304
});
302305

0 commit comments

Comments
 (0)