Skip to content

Commit 827be15

Browse files
committed
fix: The capacity credits NFT owner automatically uses the capacity credits to pay for the encryption
1 parent 39cf924 commit 827be15

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

local-tests/tests/testEthAuthSigToEncryptDecryptString.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { ILitNodeClient } from '@lit-protocol/types';
33
import { AccessControlConditions } from 'local-tests/setup/accs/accs';
44
import { TinnyEnvironment } from 'local-tests/setup/tinny-environment';
55
import { log } from '@lit-protocol/misc';
6+
import { CENTRALISATION_BY_NETWORK } from '@lit-protocol/constants';
67

78
/**
89
* Test Commands:
@@ -15,6 +16,12 @@ export const testEthAuthSigToEncryptDecryptString = async (
1516
) => {
1617
const alice = await devEnv.createRandomPerson();
1718

19+
if (CENTRALISATION_BY_NETWORK[devEnv.network] === 'decentralised') {
20+
// The capacity credits NFT owner automatically uses the capacity credits
21+
// to pay for the encryption
22+
await alice.mintCapacityCreditsNFT();
23+
}
24+
1825
const accs = AccessControlConditions.getEmvBasicAccessControlConditions({
1926
userAddress: alice.authSig.address,
2027
});
@@ -27,6 +34,7 @@ export const testEthAuthSigToEncryptDecryptString = async (
2734
devEnv.litNodeClient as unknown as ILitNodeClient
2835
);
2936

37+
3038
log('encryptRes:', encryptRes);
3139

3240
// await 5 seconds for the encryption to be mined

0 commit comments

Comments
 (0)