Skip to content

Commit

Permalink
🐛 FIX: btc activity in / outcome reversed
Browse files Browse the repository at this point in the history
  • Loading branch information
riverrun46 committed Sep 25, 2023
1 parent b2967f0 commit d4db6b4
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/queries/activities.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SymbolUC, BRC20_SYMBOLS } from '@/lib/asset-symbol';
import { SymbolUC, BRC20_SYMBOLS } from '@/lib/asset-symbol'
import { useQuery } from '@tanstack/vue-query'
import Decimal from 'decimal.js'
import { ComputedRef, Ref } from 'vue'
Expand Down Expand Up @@ -65,8 +65,8 @@ export const fetchBtcActivities = async (address: string): Promise<Activities> =
flag: '',
time: Number(activity.transactionTime),
height: Number(activity.height),
income: 0,
outcome: new Decimal(activity.amount).times(1e8).toNumber(),
income: new Decimal(activity.amount).times(1e8).toNumber(),
outcome: 0,
txid: activity.txId,
}
})
Expand Down Expand Up @@ -145,13 +145,13 @@ export const useActivitiesQuery = (
address: Ref,
params:
| {
type: 'native'
asset: Asset
}
type: 'native'
asset: Asset
}
| {
type: 'token'
token: Token
},
type: 'token'
token: Token
},
options?: { enabled: ComputedRef<boolean> }
) => {
let queryKeyParams: any
Expand Down

0 comments on commit d4db6b4

Please sign in to comment.