1
0
mirror of https://github.com/oceanprotocol/react.git synced 2024-12-23 01:29:49 +01:00

remove redundant symbol calls

This commit is contained in:
Matthias Kretschmann 2020-10-19 13:11:53 +02:00
parent a565e83220
commit bf689e7c02
Signed by: m
GPG Key ID: 606EEEF3C479A91F

View File

@ -7,8 +7,8 @@ import { getBestDataTokenPrice, getFirstPool } from 'utils/dtUtils'
import { Decimal } from 'decimal.js'
interface UsePricing {
dtSymbol: string | undefined
dtName: string | undefined
dtSymbol?: string
dtName?: string
createPricing: (
priceOptions: PriceOptions
) => Promise<TransactionReceipt | string | null>
@ -109,7 +109,6 @@ function usePricing(ddo: DDO): UsePricing {
if (!ocean || !account || !accountId) return null
try {
setDtSymbol(await ocean.datatokens.getSymbol(dataToken))
setPricingIsLoading(true)
setPricingError(undefined)
setStepBuyDT(0)
@ -186,7 +185,6 @@ function usePricing(ddo: DDO): UsePricing {
}
try {
setDtSymbol(await ocean.datatokens.getSymbol(dataToken))
setPricingIsLoading(true)
setPricingError(undefined)
setStepSellDT(0)
@ -224,7 +222,6 @@ function usePricing(ddo: DDO): UsePricing {
try {
setPricingIsLoading(true)
setPricingError(undefined)
setDtSymbol(await ocean.datatokens.getSymbol(dataToken))
setStepCreatePricing(0)
switch (priceOptions.type) {