mirror of
https://github.com/oceanprotocol/react.git
synced 2025-01-24 01:03:30 +01:00
updated price type
This commit is contained in:
parent
13145409fe
commit
6311d59cbb
@ -1,7 +1,7 @@
|
||||
export interface PriceOptions {
|
||||
price?: number
|
||||
tokensToMint: number
|
||||
type: 'simple' | 'advanced' | string
|
||||
type: 'fixed' | 'dynamic' | string
|
||||
weightOnDataToken: string
|
||||
liquidityProviderFee: string
|
||||
}
|
||||
|
@ -150,7 +150,7 @@ function usePublish(): UsePublish {
|
||||
dataTokenAddress: string
|
||||
) {
|
||||
switch (priceOptions.type) {
|
||||
case 'advanced': {
|
||||
case 'dynamic': {
|
||||
// weight is hardcoded at 9 (90%) and publisher fee at 0.03(this was a random value set by me)
|
||||
const pool = await ocean.pool.createDTPool(
|
||||
accountId,
|
||||
@ -161,7 +161,7 @@ function usePublish(): UsePublish {
|
||||
)
|
||||
break
|
||||
}
|
||||
case 'simple': {
|
||||
case 'fixed': {
|
||||
const fixedPriceExchange = await ocean.fixedRateExchange.create(
|
||||
dataTokenAddress,
|
||||
priceOptions.price.toString(),
|
||||
|
Loading…
Reference in New Issue
Block a user