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
|
// 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 {}
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
@ -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)
|
||||||
|
@ -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
|
||||||
|
@ -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 {}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user