Skip to content

Commit

Permalink
Merge PR #87 from 'nodech-preferred-inputs-bug'
Browse files Browse the repository at this point in the history
  • Loading branch information
nodech committed Oct 7, 2024
2 parents c6ee570 + 45f7de8 commit f39d224
Show file tree
Hide file tree
Showing 14 changed files with 429 additions and 86 deletions.
24 changes: 16 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18.x

Expand All @@ -34,20 +34,28 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node: [12.x, 14.x, 16.x, 18.19.x]
include:
- os: ubuntu-20.04
node-version: 12.x
- os: ubuntu-20.04
node-version: 14.x
- os: ubuntu-latest
node-version: 16.x
- os: ubuntu-latest
node-version: 18.x

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}

- name: Install libunbound
if: contains(matrix.os, 'ubuntu')
run: sudo apt-get update && sudo apt-get install -y libunbound-dev
run: |
sudo apt-get update
sudo apt-get install -y libunbound-dev
- name: Install dependencies
run: npm install
Expand Down
5 changes: 2 additions & 3 deletions lib/wallet/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -1190,7 +1190,6 @@ class HTTP extends Server {
this.post('/wallet/:id/open', async (req, res) => {
const valid = Validator.fromRequest(req);
const name = valid.str('name');
const force = valid.bool('force', false);
const broadcast = valid.bool('broadcast', true);
const sign = valid.bool('sign', true);

Expand All @@ -1200,11 +1199,11 @@ class HTTP extends Server {
const options = TransactionOptions.fromValidator(valid, res.signal);

if (broadcast) {
const tx = await req.wallet.sendOpen(name, force, options);
const tx = await req.wallet.sendOpen(name, options);
return res.json(200, tx.getJSON(this.network));
}

const mtx = await req.wallet.createOpen(name, force, options);
const mtx = await req.wallet.createOpen(name, options);

if (sign)
await req.wallet.sign(mtx, options.passphrase);
Expand Down
4 changes: 2 additions & 2 deletions lib/wallet/rpc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2001,7 +2001,7 @@ class RPC extends RPCBase {
async sendOpen(args, help) {
const opts = this._validateOpen(args, help, 'sendopen');
const wallet = this.wallet;
const tx = await wallet.sendOpen(opts.name, opts.force, {
const tx = await wallet.sendOpen(opts.name, {
account: opts.account
});

Expand All @@ -2011,7 +2011,7 @@ class RPC extends RPCBase {
async createOpen(args, help) {
const opts = this._validateOpen(args, help, 'createopen');
const wallet = this.wallet;
const mtx = await wallet.createOpen(opts.name, opts.force, {
const mtx = await wallet.createOpen(opts.name, {
paths: true,
account: opts.account
});
Expand Down
Loading

0 comments on commit f39d224

Please sign in to comment.