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

Fix error in request tokens.

This commit is contained in:
ssallam 2020-03-02 17:40:59 +01:00
parent 78d620c1df
commit 0d6913f5a7
5 changed files with 6 additions and 6 deletions

View File

@ -86,7 +86,7 @@ describe('Asset Owners', () => {
// Granting access // Granting access
try { try {
await account2.requestTokens( await account2.requestTokens(
+metadata.main.price * 10 ** -(await ocean.keeper.token.decimals()) parseInt((+metadata.main.price * 10 ** -(await ocean.keeper.token.decimals())).toString())
) )
} catch {} } catch {}

View File

@ -70,8 +70,8 @@ describe('Compute', () => {
const steps = [] const steps = []
try { try {
await account.requestTokens( await account.requestTokens(
+computeService.attributes.main.price * parseInt((+computeService.attributes.main.price *
10 ** -(await ocean.keeper.token.decimals()) 10 ** -(await ocean.keeper.token.decimals())).toString())
) )
agreementId = await ocean.compute agreementId = await ocean.compute

View File

@ -46,7 +46,7 @@ describe('Consume Asset', () => {
it('should be able to request tokens for consumer', async () => { it('should be able to request tokens for consumer', async () => {
const initialBalance = (await consumer.getBalance()).ocn const initialBalance = (await consumer.getBalance()).ocn
const claimedTokens = const claimedTokens =
+metadata.main.price * 10 ** -(await ocean.keeper.token.decimals()) parseInt((+metadata.main.price * 10 ** -(await ocean.keeper.token.decimals())).toString())
try { try {
await consumer.requestTokens(claimedTokens) await consumer.requestTokens(claimedTokens)

View File

@ -54,7 +54,7 @@ describe('Consume Asset (Brizo)', () => {
try { try {
await consumer.requestTokens( await consumer.requestTokens(
+metadata.main.price * 10 ** -(await ocean.keeper.token.decimals()) parseInt((+metadata.main.price * 10 ** -(await ocean.keeper.token.decimals())).toString())
) )
agreementId = await ocean.assets agreementId = await ocean.assets

View File

@ -52,7 +52,7 @@ xdescribe('Consume Asset (Large size)', () => {
it('should order the asset', async () => { it('should order the asset', async () => {
try { try {
await consumer.requestTokens( await consumer.requestTokens(
+metadata.main.price * 10 ** -(await ocean.keeper.token.decimals()) parseInt((+metadata.main.price * 10 ** -(await ocean.keeper.token.decimals())).toString())
) )
} catch {} } catch {}