feat: 更新环境配置,升级 API 版本至 0.0.141,调整钱包余额数据结构
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
VITE_API_URL=http://192.168.1.7:9527
|
||||
VITE_API_URL=https://riwa-api.riwsan1.com
|
||||
VITE_TRADINGVIEW_LIBRARY_URL=https://dev.riwsan1.com
|
||||
# VITE_TRADINGVIEW_DATA_API_URL=https://demo-feed-data.tradingview.com
|
||||
14
pnpm-lock.yaml
generated
14
pnpm-lock.yaml
generated
@@ -103,8 +103,8 @@ catalogs:
|
||||
specifier: ^8.7.11
|
||||
version: 8.7.11
|
||||
'@riwa/api-types':
|
||||
specifier: http://192.168.1.7:9528/api/riwa-eden-0.0.139.tgz
|
||||
version: 0.0.139
|
||||
specifier: http://192.168.1.7:9528/api/riwa-eden-0.0.141.tgz
|
||||
version: 0.0.141
|
||||
'@tailwindcss/vite':
|
||||
specifier: ^4.1.18
|
||||
version: 4.1.18
|
||||
@@ -322,7 +322,7 @@ importers:
|
||||
version: 8.7.11(@stencil/core@4.39.0)(vue-router@4.6.3(vue@3.5.25(typescript@5.9.3)))(vue@3.5.25(typescript@5.9.3))
|
||||
'@riwa/api-types':
|
||||
specifier: 'catalog:'
|
||||
version: '@riwa/eden@http://192.168.1.7:9528/api/riwa-eden-0.0.139.tgz(@elysiajs/eden@1.4.5(elysia@1.4.18(@sinclair/typebox@0.34.41)(exact-mirror@0.2.5(@sinclair/typebox@0.34.41))(file-type@21.1.1)(openapi-types@12.1.3)(typescript@5.9.3)))'
|
||||
version: '@riwa/eden@http://192.168.1.7:9528/api/riwa-eden-0.0.141.tgz(@elysiajs/eden@1.4.5(elysia@1.4.18(@sinclair/typebox@0.34.41)(exact-mirror@0.2.5(@sinclair/typebox@0.34.41))(file-type@21.1.1)(openapi-types@12.1.3)(typescript@5.9.3)))'
|
||||
'@tailwindcss/vite':
|
||||
specifier: 'catalog:'
|
||||
version: 4.1.18(vite@7.2.7(@types/node@24.10.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.1)(yaml@2.8.2))
|
||||
@@ -3062,9 +3062,9 @@ packages:
|
||||
'@remirror/core-constants@3.0.0':
|
||||
resolution: {integrity: sha512-42aWfPrimMfDKDi4YegyS7x+/0tlzaqwPQCULLanv3DMIlu96KTJR0fM5isWX2UViOqlGnX6YFgqWepcX+XMNg==}
|
||||
|
||||
'@riwa/eden@http://192.168.1.7:9528/api/riwa-eden-0.0.139.tgz':
|
||||
resolution: {tarball: http://192.168.1.7:9528/api/riwa-eden-0.0.139.tgz}
|
||||
version: 0.0.139
|
||||
'@riwa/eden@http://192.168.1.7:9528/api/riwa-eden-0.0.141.tgz':
|
||||
resolution: {tarball: http://192.168.1.7:9528/api/riwa-eden-0.0.141.tgz}
|
||||
version: 0.0.141
|
||||
peerDependencies:
|
||||
'@elysiajs/eden': ^1.4.5
|
||||
|
||||
@@ -12419,7 +12419,7 @@ snapshots:
|
||||
|
||||
'@remirror/core-constants@3.0.0': {}
|
||||
|
||||
'@riwa/eden@http://192.168.1.7:9528/api/riwa-eden-0.0.139.tgz(@elysiajs/eden@1.4.5(elysia@1.4.18(@sinclair/typebox@0.34.41)(exact-mirror@0.2.5(@sinclair/typebox@0.34.41))(file-type@21.1.1)(openapi-types@12.1.3)(typescript@5.9.3)))':
|
||||
'@riwa/eden@http://192.168.1.7:9528/api/riwa-eden-0.0.141.tgz(@elysiajs/eden@1.4.5(elysia@1.4.18(@sinclair/typebox@0.34.41)(exact-mirror@0.2.5(@sinclair/typebox@0.34.41))(file-type@21.1.1)(openapi-types@12.1.3)(typescript@5.9.3)))':
|
||||
dependencies:
|
||||
'@elysiajs/eden': 1.4.5(elysia@1.4.18(@sinclair/typebox@0.34.41)(exact-mirror@0.2.5(@sinclair/typebox@0.34.41))(file-type@21.1.1)(openapi-types@12.1.3)(typescript@5.9.3))
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ catalog:
|
||||
'@ionic/cli': ^7.2.1
|
||||
'@ionic/vue': ^8.7.11
|
||||
'@ionic/vue-router': ^8.7.11
|
||||
'@riwa/api-types': http://192.168.1.7:9528/api/riwa-eden-0.0.139.tgz
|
||||
'@riwa/api-types': http://192.168.1.7:9528/api/riwa-eden-0.0.141.tgz
|
||||
'@tailwindcss/vite': ^4.1.18
|
||||
'@types/lodash-es': ^4.17.12
|
||||
'@types/node': ^24.10.2
|
||||
|
||||
@@ -15,6 +15,8 @@ export type DepositFiatData = Treaty.Data<typeof client.api.deposit.fiat.post>;
|
||||
|
||||
export type BalancesData = Treaty.Data<typeof client.api.wallet.balances.get>;
|
||||
|
||||
export type BalancesSummaryData = Treaty.Data<typeof client.api.wallet.balances.summary.get>;
|
||||
|
||||
export type TotalAssetValue = Treaty.Data<typeof client.api.wallet.total_value.get>;
|
||||
|
||||
export type WithdrawBody = Omit<Parameters<typeof client.api.withdraw.post>[0], "assetCode" | "withdrawMethod"> & {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { BalancesData, BankAccountsData, SupportBanksData, TotalAssetValue } from "@/api/types";
|
||||
import type { BalancesData, BalancesSummaryData, BankAccountsData, SupportBanksData, TotalAssetValue } from "@/api/types";
|
||||
import { defineStore } from "pinia";
|
||||
import { client, safeClient } from "@/api";
|
||||
|
||||
@@ -10,7 +10,7 @@ interface USDTBalance {
|
||||
|
||||
interface State {
|
||||
totalAssetValue: TotalAssetValue;
|
||||
balances: BalancesData;
|
||||
balances: BalancesSummaryData;
|
||||
fundingBalances: BalancesData;
|
||||
tradingBalances: BalancesData;
|
||||
bankAccounts: BankAccountsData[];
|
||||
@@ -47,7 +47,7 @@ export const useWalletStore = defineStore("wallet", () => {
|
||||
}
|
||||
|
||||
async function syncBalances() {
|
||||
const { data: balances } = await safeClient(() => client.api.wallet.balances.get(), { silent: true });
|
||||
const { data: balances } = await safeClient(() => client.api.wallet.balances.summary.get(), { silent: true });
|
||||
state.balances = balances.value || [];
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ const defaultOptions = {
|
||||
locale: "zh",
|
||||
library_path: `${VITE_TRADINGVIEW_LIBRARY_URL}/charting_library/`,
|
||||
datafeed,
|
||||
interval: "1D" as ResolutionString,
|
||||
interval: "1" as ResolutionString,
|
||||
symbol: "",
|
||||
debug: true,
|
||||
autosize: true,
|
||||
|
||||
@@ -48,12 +48,12 @@ const { balances, totalAssetValue } = storeToRefs(walletStore);
|
||||
{{ asset.assetCode }}
|
||||
</div>
|
||||
<div class="text-xs text-text-700 font-bold">
|
||||
Total: ${{ asset.total }}
|
||||
{{ asset.asset.name }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="w-fit font-bold">
|
||||
${{ Number(asset.available) }}
|
||||
${{ Number(asset.total) }}
|
||||
</div>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
|
||||
Reference in New Issue
Block a user