fix: 🐛 Fix undefined settings
parent
e12c28cb8e
commit
ae011a4e28
6
main.js
6
main.js
|
@ -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,
|
||||
|
|
|
@ -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": {
|
||||
|
|
Loading…
Reference in New Issue