mirror of
https://github.com/oceanprotocol/ocean.js.git
synced 2024-11-26 20:39:05 +01:00
Update OceanPool.ts
This commit is contained in:
parent
bca3202814
commit
e1c7eeb6ba
@ -52,7 +52,7 @@ export class OceanPool extends Pool {
|
||||
* @param {String} token DataToken address
|
||||
* @param {String} amount DataToken amount
|
||||
* @param {String} weight DataToken weight
|
||||
* @param {String} fee Swap fee (as float)
|
||||
* @param {String} fee Swap fee. 0.1=10% fee(max allowed)
|
||||
* @return {String}
|
||||
*/
|
||||
public async createDTPool(
|
||||
@ -66,6 +66,10 @@ export class OceanPool extends Pool {
|
||||
console.error('oceanAddress is not defined')
|
||||
return null
|
||||
}
|
||||
if (parseFloat(fee) > 0.1) {
|
||||
console.error('Swap fee to high')
|
||||
return null
|
||||
}
|
||||
if (parseFloat(weight) > 9 || parseFloat(weight) < 1) {
|
||||
console.error('Weight out of bounds (min 1, max9)')
|
||||
return null
|
||||
|
Loading…
x
Reference in New Issue
Block a user