fix: always consider user input when performing swap (#572)
* fix: always consider user input when performing swap * refactor: extract decimal places constants * refactor: extract minimumOptimalValue * fix: handle bzz precision and tweak message
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
import axios from 'axios'
|
||||
import { BEE_DESKTOP_LATEST_RELEASE_PAGE_API } from '../constants'
|
||||
import { DaiToken } from '../models/DaiToken'
|
||||
import { Token } from '../models/Token'
|
||||
import { postJson } from './net'
|
||||
import { BEE_DESKTOP_LATEST_RELEASE_PAGE_API } from '../constants'
|
||||
|
||||
export async function getBzzPriceAsDai(desktopUrl: string): Promise<Token> {
|
||||
const response = await axios.get(`${desktopUrl}/price`)
|
||||
|
||||
return DaiToken.fromDecimal(response.data, 18)
|
||||
return DaiToken.fromDecimal(response.data)
|
||||
}
|
||||
|
||||
export async function upgradeToLightNode(desktopUrl: string, rpcProvider: string): Promise<void> {
|
||||
|
||||
Reference in New Issue
Block a user