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:
parent
78d620c1df
commit
0d6913f5a7
@ -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 {}
|
||||
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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 {}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user