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
try {
await account2.requestTokens(
+metadata.main.price * 10 ** -(await ocean.keeper.token.decimals())
parseInt((+metadata.main.price * 10 ** -(await ocean.keeper.token.decimals())).toString())
)
} catch {}

View File

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

View File

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

View File

@ -54,7 +54,7 @@ describe('Consume Asset (Brizo)', () => {
try {
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

View File

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