fix: 🐛 Fix undefined settings

main
Keith Irwin 2024-04-20 19:15:17 -06:00
parent e12c28cb8e
commit ae011a4e28
Signed by: ki9
GPG Key ID: DF773B3F4A88DA86
2 changed files with 3 additions and 5 deletions

View File

@ -1,10 +1,8 @@
const axios = require('axios')
module.exports = class Wallet {
url; wallet; password;
address; viewKey; restoreHeight;
constructor (settings) {
this.url = settings.url
// Open wallet
try {
@ -37,7 +35,7 @@ module.exports = class Wallet {
async rpc(method, params) {
let res; try {
res = await axios.post(`${settings.url}/json_rpc`, {
res = await axios.post(`${this.url}/json_rpc`, {
jsonrpc: '2.0',
id: '0',
method: method,

View File

@ -1,7 +1,7 @@
{
"name": "monero-wallet-rpc-js",
"type": "commonjs",
"version": "1.1.8",
"version": "1.1.9",
"description": "Javascript wrapper for monero-wallet-rpc calls",
"main": "main.js",
"scripts": {