Skip to content

Commit 3b2c7ac

Browse files
committed
feat: add reloadWithUnlockNotification to WalletV1 interface
1 parent 8650b41 commit 3b2c7ac

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/ps-web-apis.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,9 +288,24 @@ export interface UnlockedContentResult {
288288
content: UnlockedContent[];
289289
}
290290

291+
export type UnlockNotificationResult =
292+
| {
293+
status: 'ok';
294+
result: {
295+
contentId: string;
296+
usedCredits: number;
297+
remainingCredits: number;
298+
};
299+
}
300+
| {
301+
status: 'error';
302+
result: null;
303+
};
304+
291305
export interface WalletV1 {
292306
getUserCreditBalance: GetUserCreditBalance;
293307
getUserUnlockedContent: () => Promise<UnlockedContentResult>;
308+
reloadWithUnlockResultNotification: (unlockResult: UnlockNotificationResult) => void;
294309
}
295310

296311
export type ILayer = "privacy" | "reject";

0 commit comments

Comments
 (0)