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.
package/dist/index.mjs CHANGED
@@ -3362,15 +3362,17 @@ Run: npx moltspay approve --chain ${chainName} --spender ${spender}`
3362
3362
  loadWallet() {
3363
3363
  const walletPath = join4(this.configDir, "wallet.json");
3364
3364
  if (existsSync4(walletPath)) {
3365
- try {
3366
- const stats = statSync(walletPath);
3367
- const mode = stats.mode & 511;
3368
- if (mode !== 384) {
3369
- console.warn(`[MoltsPay] WARNING: wallet.json has insecure permissions (${mode.toString(8)})`);
3370
- console.warn(`[MoltsPay] Fixing permissions to 0600...`);
3371
- chmodSync(walletPath, 384);
3365
+ if (process.platform !== "win32") {
3366
+ try {
3367
+ const stats = statSync(walletPath);
3368
+ const mode = stats.mode & 511;
3369
+ if (mode !== 384) {
3370
+ console.warn(`[MoltsPay] WARNING: wallet.json has insecure permissions (${mode.toString(8)})`);
3371
+ console.warn(`[MoltsPay] Fixing permissions to 0600...`);
3372
+ chmodSync(walletPath, 384);
3373
+ }
3374
+ } catch {
3372
3375
  }
3373
- } catch (err) {
3374
3376
  }
3375
3377
  const content = readFileSync4(walletPath, "utf-8");
3376
3378
  return JSON.parse(content);