embedded: fix DB deletion status code check
This commit is contained in:
parent
f7c97f73bb
commit
3d1b1ec724
@ -143,17 +143,8 @@ class NativeWalletMessageHandler {
|
|||||||
this.walletArgs = { ...oldArgs };
|
this.walletArgs = { ...oldArgs };
|
||||||
if (oldArgs && oldArgs.persistentStoragePath) {
|
if (oldArgs && oldArgs.persistentStoragePath) {
|
||||||
const ret = qjsOs.remove(oldArgs.persistentStoragePath);
|
const ret = qjsOs.remove(oldArgs.persistentStoragePath);
|
||||||
if (ret != null) {
|
if (ret != 0) {
|
||||||
return {
|
logger.error("removing DB file failed");
|
||||||
type: "error",
|
|
||||||
id,
|
|
||||||
operation,
|
|
||||||
error: {
|
|
||||||
code: TalerErrorCode.GENERIC_UNEXPECTED_REQUEST_ERROR,
|
|
||||||
hint: `path ${oldArgs.persistentStoragePath}`,
|
|
||||||
message: "removing DB file failed",
|
|
||||||
},
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
// Prevent further storage!
|
// Prevent further storage!
|
||||||
this.walletArgs.persistentStoragePath = undefined;
|
this.walletArgs.persistentStoragePath = undefined;
|
||||||
@ -200,7 +191,7 @@ export function installNativeWalletListener(): void {
|
|||||||
msg.args ?? {},
|
msg.args ?? {},
|
||||||
);
|
);
|
||||||
logger.info(
|
logger.info(
|
||||||
`native listener: sending success response for ${operation} (${id})`,
|
`native listener: sending ${respMsg.type} response for ${operation} (${id})`,
|
||||||
);
|
);
|
||||||
sendNativeMessage(respMsg);
|
sendNativeMessage(respMsg);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user