Skip to content

Commit

Permalink
chore: Update Activity Api
Browse files Browse the repository at this point in the history
  • Loading branch information
AricRedemption committed Feb 22, 2024
1 parent 365c895 commit 64a8756
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/queries/activities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Decimal from 'decimal.js'
import { ComputedRef, Ref } from 'vue'
import { type Asset } from '@/data/assets'
import { useQuery } from '@tanstack/vue-query'
import { metaletApi, mvcApi } from './request'
import { metaletApi, mvcApi,metaletApiV3 } from './request'
import { SymbolTicker } from '@/lib/asset-symbol'

export type Activity = {
Expand Down Expand Up @@ -50,7 +50,7 @@ type BRC20RawActivity = {
}

export const fetchBtcActivities = async (address: string): Promise<Activities> => {
return metaletApi<{ transactionList: BtcRawActivity[] }>(`/address/activities`)
return metaletApiV3<{ transactionList: BtcRawActivity[] }>(`/address/activities`)
.get({
address,
chain: 'btc',
Expand All @@ -72,7 +72,7 @@ export const fetchBtcActivities = async (address: string): Promise<Activities> =
}

export const fetchBRC20Activities = async (address: string, symbol: SymbolTicker): Promise<Activities> => {
return metaletApi<{ inscriptionsList: BRC20RawActivity[] }>(`/address/brc20/activities`)
return metaletApiV3<{ inscriptionsList: BRC20RawActivity[] }>(`/address/brc20/activities`)
.get({
address,
chain: 'btc',
Expand Down
3 changes: 2 additions & 1 deletion src/queries/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ export interface FeeRate {
}

export const getBTCTRate = async (): Promise<PageResult<FeeRate>> => {
return metaletApiV3<PageResult<FeeRate>>(`/btc/fee/summary`).get()
const net = getNet()
return metaletApiV3<PageResult<FeeRate>>(`/btc/fee/summary`).get({ net })
}

export const useBTCRateQuery = (options?: { enabled: ComputedRef<boolean> }) => {
Expand Down

0 comments on commit 64a8756

Please sign in to comment.