This repository was archived by the owner on Nov 29, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,8 @@ import { Tokens, Wallet } from "./types";
22import { HTTPClient , ResponseWithChainMeta } from "../.." ;
33import { get , post } from "../network-repository" ;
44import { _Params } from "../../http/client" ;
5+ import { Transaction } from "../transactions/types" ;
6+ import { PaginationOptions } from "../.." ;
57
68export const walletGet = ( client : HTTPClient ) => ( id : string ) : Promise < ResponseWithChainMeta < Wallet > > =>
79 get < ResponseWithChainMeta < Wallet > > ( client ) ( `wallets/${ id } ` ) ;
@@ -13,3 +15,9 @@ export const walletTokens = (client: HTTPClient) => (
1315
1416export const walletSearch = ( client : HTTPClient ) => ( searchQuery : _Params ) : Promise < ResponseWithChainMeta < Wallet [ ] > > =>
1517 post < ResponseWithChainMeta < Wallet [ ] > > ( client ) ( "wallets/search" , undefined , searchQuery ) ;
18+
19+ export const walletTransactions = ( client : HTTPClient ) => (
20+ id : string ,
21+ pagination : PaginationOptions = { } ,
22+ ) : Promise < ResponseWithChainMeta < Transaction [ ] > > =>
23+ get < ResponseWithChainMeta < Transaction [ ] > > ( client ) ( `wallets/${ id } /transactions` , { ...pagination } ) ;
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ import {
3131 transactions ,
3232} from "." ;
3333import { DeepPartial } from "../utils/merge" ;
34+ import { walletTransactions } from "./repositories" ;
3435
3536export class UNSClient {
3637 public http : HTTPClient ;
@@ -152,6 +153,7 @@ export class UNSClient {
152153 get : walletGet ( this . http ) ,
153154 tokens : walletTokens ( this . http ) ,
154155 search : walletSearch ( this . http ) ,
156+ transactions : walletTransactions ( this . http ) ,
155157 } ;
156158 }
157159}
You can’t perform that action at this time.
0 commit comments