@credenza3/contracts-lib-sui 0.1.9 → 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/client/index.cjs +10 -1
- package/dist/cjs/client/index.cjs.map +2 -2
- package/dist/esm/client/index.mjs +10 -1
- package/dist/esm/client/index.mjs.map +2 -2
- package/dist/umd/client/index.js +32 -64
- package/dist/umd/client/index.js.map +4 -4
- package/dist/umd/signer/index.js +660 -44
- package/dist/umd/signer/index.js.map +4 -4
- package/package.json +18 -18
|
@@ -6494,7 +6494,16 @@ var CredenzaLedger = class extends CredenzaSuiModule {
|
|
|
6494
6494
|
StructType: capType
|
|
6495
6495
|
}
|
|
6496
6496
|
});
|
|
6497
|
-
this.treasuryCap = treasury
|
|
6497
|
+
this.treasuryCap = treasury?.data?.["0"]?.data?.objectId;
|
|
6498
|
+
if (!this.treasuryCap) {
|
|
6499
|
+
const event_type = `${this.client.getPackageId()}::credenza_loyalty::LoyaltyConfigCreatedEvent`;
|
|
6500
|
+
const res = await this.client.suiClient.queryEvents({
|
|
6501
|
+
query: {
|
|
6502
|
+
MoveEventType: event_type
|
|
6503
|
+
}
|
|
6504
|
+
});
|
|
6505
|
+
this.treasuryCap = res.data["0"].parsedJson["id"];
|
|
6506
|
+
}
|
|
6498
6507
|
} catch {
|
|
6499
6508
|
throw new Error(`Loyalty treasury cap not found ${capType} for owner ${this.client.getSignerAddress()}`);
|
|
6500
6509
|
}
|