This commit is contained in:
Luk Lu
2019-10-03 17:00:59 +08:00

View File

@@ -2,6 +2,7 @@ import http from '@/utils/http';
import _ from 'lodash'; import _ from 'lodash';
import BigNumber from 'bignumber.js'; import BigNumber from 'bignumber.js';
import { CoinDrawn, FundBasic } from '@/types/common'; import { CoinDrawn, FundBasic } from '@/types/common';
import { encryptPwd } from '@/utils/transform';
export async function getCoins(): Promise<CoinDrawn[]> { export async function getCoins(): Promise<CoinDrawn[]> {
const { ok, msg, data } = await http.get<CoinDrawn[]>('/fund/withdrawCoins'); const { ok, msg, data } = await http.get<CoinDrawn[]>('/fund/withdrawCoins');
@@ -23,7 +24,7 @@ export async function withdraw(
coinId: coin.id, coinId: coin.id,
targetAddress, targetAddress,
amount, amount,
password, password: encryptPwd(password),
}); });
if (ok) return if (ok) return
throw Error(msg); throw Error(msg);