Style fix

This commit is contained in:
saplf
2019-09-08 22:44:17 +08:00
parent 49609c11c1
commit 7fae21f7ca
4 changed files with 9 additions and 14 deletions

View File

@@ -2,20 +2,13 @@ import http from '@/utils/http';
import _ from 'lodash';
import BigNumber from 'bignumber.js';
import { CoinDrawn, FundBasic } from '@/types/common';
import { loadDrawCoins, storeDrawCoins } from '@/utils/storage';
export async function getCoins(): Promise<CoinDrawn[]> {
const coinsCached = loadDrawCoins();
if (coinsCached && coinsCached.length) {
return coinsCached;
}
const { ok, msg, data } = await http.get<CoinDrawn[]>('/fund/withdrawCoins');
if (!ok || !data) {
throw Error(msg);
}
storeDrawCoins(data);
return data;
}