@spirobel/monero-wallet-api 0.3.13 → 0.3.14
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.
|
@@ -63,5 +63,5 @@ export type ShareViewkey002Pruned = {
|
|
|
63
63
|
primary_address: string;
|
|
64
64
|
wallet_slot: number;
|
|
65
65
|
};
|
|
66
|
-
export declare function potentialSuccessRedirect002(payload: ShareViewkeyPayload): Promise<
|
|
66
|
+
export declare function potentialSuccessRedirect002(payload: ShareViewkeyPayload): Promise<ShareViewkeyResult | undefined>;
|
|
67
67
|
export declare function handle002ShareRequest(req: Request, wallets: ScanSettingOpened[], parsed_cb: (parsed_body: ShareViewkey002Pruned) => Promise<void>, successUrl?: string): Promise<ShareViewkeyResult>;
|
|
@@ -221,6 +221,9 @@ export async function potentialSuccessRedirect002(payload) {
|
|
|
221
221
|
window.location.href = shareVKresult.successUrl;
|
|
222
222
|
window.location.reload();
|
|
223
223
|
}
|
|
224
|
+
else {
|
|
225
|
+
return shareVKresult;
|
|
226
|
+
}
|
|
224
227
|
}
|
|
225
228
|
// backend response
|
|
226
229
|
export async function handle002ShareRequest(req, wallets, parsed_cb, successUrl) {
|
|
@@ -239,9 +242,6 @@ export async function handle002ShareRequest(req, wallets, parsed_cb, successUrl)
|
|
|
239
242
|
if (foundSlot.primary_address !== primary_address) {
|
|
240
243
|
return { ok: false, successUrl: null };
|
|
241
244
|
}
|
|
242
|
-
if (foundSlot.secret_view_key !== viewkey) {
|
|
243
|
-
return { ok: false, successUrl: null };
|
|
244
|
-
}
|
|
245
245
|
}
|
|
246
246
|
await parsed_cb({ viewkey, primary_address, wallet_slot });
|
|
247
247
|
return {
|