Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more specific error when linked inputs are pending. #87

Open
wants to merge 6 commits into
base: production-namebase
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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