Skip to content

Commit 9831c9a

Browse files
committed
add price feed and log json stringified
1 parent d56ff6f commit 9831c9a

File tree

3 files changed

+23
-16
lines changed

3 files changed

+23
-16
lines changed

local-tests/setup/shiva-client.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ type ContractAbis = {
1010
pkpHelper: string;
1111
contractResolver: string;
1212
paymentDelegation: string;
13+
priceFeed: string;
1314
};
1415

1516
type ContractAddresses = {

local-tests/setup/shiva-client.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,9 @@ export class TestnetClient {
117117
},
118118
PKPNFTMetadata: {},
119119
PubkeyRouter: {},
120-
PriceFeed: {},
120+
PriceFeed: {
121+
abi: JSON.parse(testNetConfig.contractAbis.priceFeed),
122+
},
121123
},
122124
};
123125
return networkContext;

packages/core/src/lib/lit-core.ts

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -558,22 +558,26 @@ export class LitCore {
558558
'❓ this.config.contractContext:',
559559
this.config.contractContext
560560
);
561-
const logAddresses = Object.entries(this.config.contractContext).reduce(
562-
(output, [key, val]) => {
563-
564-
console.log('❓ key:', key);
565-
console.log('❓ val:', val);
566-
567-
// @ts-expect-error since the object hash returned by `getContractAddresses` is `any`, we have no types here
568-
output[key] = val.address;
569-
return output;
570-
},
571-
{}
561+
console.log(
562+
'? WHAT IS THIS:',
563+
JSON.stringify(this.config.contractContext)
572564
);
573-
console.log('❓ logAddresses:', logAddresses);
574-
if (this.config.litNetwork === LIT_NETWORK.Custom) {
575-
log('❓ using custom contracts: ', logAddresses);
576-
}
565+
// const logAddresses = Object.entries(this.config.contractContext).reduce(
566+
// (output, [key, val]) => {
567+
568+
// console.log('❓ key:', key);
569+
// console.log('❓ val:', val);
570+
571+
// // @ts-expect-error since the object hash returned by `getContractAddresses` is `any`, we have no types here
572+
// output[key] = val.address;
573+
// return output;
574+
// },
575+
// {}
576+
// );
577+
// console.log('❓ logAddresses:', logAddresses);
578+
// if (this.config.litNetwork === LIT_NETWORK.Custom) {
579+
// log('❓ using custom contracts: ', logAddresses);
580+
// }
577581
}
578582

579583
// Re-use staking contract instance from previous connect() executions that succeeded to improve performance

0 commit comments

Comments
 (0)