mirror of
https://github.com/oceanprotocol/ocean.js.git
synced 2024-11-26 20:39:05 +01:00
Merge pull request #455 from oceanprotocol/bug/buy_sell
fullfill promises
This commit is contained in:
commit
72fdd79e77
@ -574,7 +574,7 @@ export class OceanPool extends Pool {
|
|||||||
this.logger.error('ERROR: OCEAN approve failed')
|
this.logger.error('ERROR: OCEAN approve failed')
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
return this.swapExactAmountOut(
|
const tx = await this.swapExactAmountOut(
|
||||||
account,
|
account,
|
||||||
poolAddress,
|
poolAddress,
|
||||||
this.oceanAddress,
|
this.oceanAddress,
|
||||||
@ -583,6 +583,7 @@ export class OceanPool extends Pool {
|
|||||||
dtAmountWanted,
|
dtAmountWanted,
|
||||||
maxPrice
|
maxPrice
|
||||||
)
|
)
|
||||||
|
return tx
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -630,7 +631,7 @@ export class OceanPool extends Pool {
|
|||||||
this.logger.error('ERROR: OCEAN approve failed')
|
this.logger.error('ERROR: OCEAN approve failed')
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
return this.swapExactAmountIn(
|
const tx = this.swapExactAmountIn(
|
||||||
account,
|
account,
|
||||||
poolAddress,
|
poolAddress,
|
||||||
this.oceanAddress,
|
this.oceanAddress,
|
||||||
@ -639,6 +640,7 @@ export class OceanPool extends Pool {
|
|||||||
minimumdtAmountWanted,
|
minimumdtAmountWanted,
|
||||||
maxPrice
|
maxPrice
|
||||||
)
|
)
|
||||||
|
return tx
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -685,7 +687,7 @@ export class OceanPool extends Pool {
|
|||||||
this.logger.error('ERROR: DT approve failed')
|
this.logger.error('ERROR: DT approve failed')
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
return this.swapExactAmountIn(
|
const tx = this.swapExactAmountIn(
|
||||||
account,
|
account,
|
||||||
poolAddress,
|
poolAddress,
|
||||||
dtAddress,
|
dtAddress,
|
||||||
@ -694,6 +696,7 @@ export class OceanPool extends Pool {
|
|||||||
oceanAmountWanted,
|
oceanAmountWanted,
|
||||||
maxPrice
|
maxPrice
|
||||||
)
|
)
|
||||||
|
return tx
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user