File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
packages/networks/src/networks/vNaga/envs/naga-staging Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ export type CreateChainManagerReturn = {
2121 pkpPermissionsManager : (
2222 pkpIdentifier : PkpIdentifierRaw
2323 ) => InstanceType < typeof api . PKPPermissionsManager > ;
24+ paymentManager : ( ) => InstanceType < typeof api . PaymentManager > ;
2425 getPKPsByAuthData : (
2526 authData : {
2627 authMethodType : number | bigint ;
@@ -81,6 +82,12 @@ export const createChainManager = (
8182 accountOrWalletClient
8283 ) ;
8384 } ,
85+ paymentManager : ( ) => {
86+ return new api . PaymentManager (
87+ _networkConfig ,
88+ accountOrWalletClient
89+ ) ;
90+ } ,
8491 getPKPsByAuthData : (
8592 authData : {
8693 authMethodType : number | bigint ;
@@ -107,9 +114,9 @@ export const createChainManager = (
107114 const defaultPagination = { limit : 10 , offset : 0 } ;
108115 const finalPagination = params . pagination
109116 ? {
110- limit : params . pagination . limit ?? defaultPagination . limit ,
111- offset : params . pagination . offset ?? defaultPagination . offset ,
112- }
117+ limit : params . pagination . limit ?? defaultPagination . limit ,
118+ offset : params . pagination . offset ?? defaultPagination . offset ,
119+ }
113120 : defaultPagination ;
114121
115122 return getPKPsByAddress (
Original file line number Diff line number Diff line change @@ -341,7 +341,8 @@ const networkModuleObject = {
341341 getPaymentManager : async ( params : {
342342 account : ExpectedAccountOrWalletClient ;
343343 } ) : Promise < PaymentManager > => {
344- throw new Error ( 'PaymentManager is not available in naga-staging environment. Please use naga-dev instead.' ) ;
344+ const chainManager = createChainManager ( params . account ) ;
345+ return chainManager . api . paymentManager ( ) ;
345346 } ,
346347
347348 /**
You can’t perform that action at this time.
0 commit comments