moltspay 1.4.1 → 1.5.0

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.
@@ -1294,15 +1294,17 @@ Run: npx moltspay approve --chain ${chainName} --spender ${spender}`
1294
1294
  loadWallet() {
1295
1295
  const walletPath = join2(this.configDir, "wallet.json");
1296
1296
  if (existsSync2(walletPath)) {
1297
- try {
1298
- const stats = statSync(walletPath);
1299
- const mode = stats.mode & 511;
1300
- if (mode !== 384) {
1301
- console.warn(`[MoltsPay] WARNING: wallet.json has insecure permissions (${mode.toString(8)})`);
1302
- console.warn(`[MoltsPay] Fixing permissions to 0600...`);
1303
- chmodSync(walletPath, 384);
1297
+ if (process.platform !== "win32") {
1298
+ try {
1299
+ const stats = statSync(walletPath);
1300
+ const mode = stats.mode & 511;
1301
+ if (mode !== 384) {
1302
+ console.warn(`[MoltsPay] WARNING: wallet.json has insecure permissions (${mode.toString(8)})`);
1303
+ console.warn(`[MoltsPay] Fixing permissions to 0600...`);
1304
+ chmodSync(walletPath, 384);
1305
+ }
1306
+ } catch {
1304
1307
  }
1305
- } catch (err) {
1306
1308
  }
1307
1309
  const content = readFileSync2(walletPath, "utf-8");
1308
1310
  return JSON.parse(content);