@reflectmoney/stable.ts 1.1.5 → 1.1.6

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.
@@ -39,7 +39,7 @@ export declare abstract class Stablecoin<T extends Controller> {
39
39
  *
40
40
  * @returns Promise resolving to void, sets the controller and strategy fields
41
41
  */
42
- load(schema: {
42
+ load(schema?: {
43
43
  fromAccountAddress: (connection: Connection, key: PublicKey) => Promise<T>;
44
44
  }): Promise<void>;
45
45
  buildLookupTables<T extends MintContext>(signer: PublicKey): Promise<{
@@ -40,6 +40,8 @@ class Stablecoin {
40
40
  */
41
41
  load(schema) {
42
42
  return __awaiter(this, void 0, void 0, function* () {
43
+ if (!schema)
44
+ throw new Error("Schema has not been provided.");
43
45
  const controller = yield schema
44
46
  .fromAccountAddress(this.connection, this.controllerKey);
45
47
  this.controller = controller;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reflectmoney/stable.ts",
3
- "version": "1.1.5",
3
+ "version": "1.1.6",
4
4
  "type": "commonjs",
5
5
  "author": "stablecoinjesus @ Palindrome Engineering",
6
6
  "repository": {