Skip to content

Commit

Permalink
chore: consolidate src20 sql query functions
Browse files Browse the repository at this point in the history
  • Loading branch information
reinamora137 committed Apr 19, 2024
1 parent 5483fdb commit 410f04e
Show file tree
Hide file tree
Showing 13 changed files with 243 additions and 495 deletions.
14 changes: 10 additions & 4 deletions lib/controller/wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,14 @@ export const api_get_stamp_balance = async (
export const api_get_src20_valid_tx = async (tx_hash: string) => {
try {
const client = await getClient();
const tx_data = await Src20Class.get_valid_src20_tx_by_tx_hash_with_client(
const tx_data = await Src20Class.get_valid_src20_tx_with_client(
client,
null,
null,
null,
undefined,
undefined,
"ASC",
tx_hash,
);
releaseClient(client);
Expand All @@ -55,7 +61,7 @@ export const api_get_src20_valid_tx = async (tx_hash: string) => {
export const api_get_src20_balance = async (address: string) => {
try {
const client = await getClient();
const balances = await Src20Class.get_src20_balance_by_address_with_client(
const balances = await Src20Class.get_src20_balance_with_client(
client,
address,
);
Expand Down Expand Up @@ -85,7 +91,7 @@ export const api_get_src20_balance_by_tick = async (
try {
const client = await getClient();
const balances = await Src20Class
.get_src20_balance_by_address_and_tick_with_client(
.get_src20_balance_with_client(
client,
address,
tick,
Expand Down Expand Up @@ -130,7 +136,7 @@ export const api_get_balance = async (
} else {
stamps = [];
}
const src20 = await Src20Class.get_src20_balance_by_address_with_client(
const src20 = await Src20Class.get_src20_balance_with_client(
client,
address,
);
Expand Down
Loading

0 comments on commit 410f04e

Please sign in to comment.