Subscribe to zap receipt when zapping, show success for external
payment
This commit is contained in:
@@ -37,9 +37,20 @@ export class MockNostrDataService extends Service {
|
||||
@tracked blossomServers = [];
|
||||
@tracked placePhotos = [];
|
||||
@tracked profiles = {};
|
||||
@tracked zapReceipts = {};
|
||||
|
||||
store = {
|
||||
add: () => {},
|
||||
timeline: () => ({
|
||||
subscribe: () => ({
|
||||
unsubscribe: () => {},
|
||||
}),
|
||||
}),
|
||||
replaceable: () => ({
|
||||
subscribe: () => ({
|
||||
unsubscribe: () => {},
|
||||
}),
|
||||
}),
|
||||
};
|
||||
|
||||
getProfile(pubkey) {
|
||||
@@ -152,6 +163,17 @@ export class MockNostrZapService extends Service {
|
||||
return this._webLNAvailable;
|
||||
}
|
||||
|
||||
subscribeForZapReceipt(zapRequest, photo, onReceipt) {
|
||||
this._receiptCallback = onReceipt;
|
||||
this._receiptZapRequest = zapRequest;
|
||||
return {
|
||||
unsubscribe: () => {
|
||||
this._receiptCallback = null;
|
||||
this._receiptZapRequest = null;
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
async zap() {
|
||||
return this._zapResult;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user