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 };
|
||||
if (oldArgs && oldArgs.persistentStoragePath) {
|
||||
const ret = qjsOs.remove(oldArgs.persistentStoragePath);
|
||||
if (ret != null) {
|
||||
return {
|
||||
type: "error",
|
||||
id,
|
||||
operation,
|
||||
error: {
|
||||
code: TalerErrorCode.GENERIC_UNEXPECTED_REQUEST_ERROR,
|
||||
hint: `path ${oldArgs.persistentStoragePath}`,
|
||||
message: "removing DB file failed",
|
||||
},
|
||||
};
|
||||
if (ret != 0) {
|
||||
logger.error("removing DB file failed");
|
||||
}
|
||||
// Prevent further storage!
|
||||
this.walletArgs.persistentStoragePath = undefined;
|
||||
@ -200,7 +191,7 @@ export function installNativeWalletListener(): void {
|
||||
msg.args ?? {},
|
||||
);
|
||||
logger.info(
|
||||
`native listener: sending success response for ${operation} (${id})`,
|
||||
`native listener: sending ${respMsg.type} response for ${operation} (${id})`,
|
||||
);
|
||||
sendNativeMessage(respMsg);
|
||||
} catch (e) {
|
||||
|
Loading…
Reference in New Issue
Block a user