Skip to content

Commit

Permalink
Merge pull request #877 from braydonf/abandon
Browse files Browse the repository at this point in the history
Add abandon tx to CLI and client
  • Loading branch information
braydonf committed Oct 15, 2019
2 parents ace4a08 + f5887d1 commit 7b47913
Show file tree
Hide file tree
Showing 2 changed files with 94 additions and 15 deletions.
12 changes: 12 additions & 0 deletions bin/bwallet-cli
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,14 @@ class CLI {
this.log('Zapped!');
}

async abandonTX() {
const hash = this.config.str(0);

await this.wallet.abandon(hash);

this.log('Abandoned tx: ' + hash);
}

async viewTX() {
const raw = this.config.str([0, 'tx']);
const tx = await this.wallet.fill(raw);
Expand Down Expand Up @@ -556,6 +564,9 @@ class CLI {
case 'zap':
await this.zapWallet();
break;
case 'abandon':
await this.abandonTX();
break;
case 'tx':
await this.getDetails();
break;
Expand Down Expand Up @@ -615,6 +626,7 @@ class CLI {
this.log(' $ mktx [address] [value]: Create transaction.');
this.log(' $ sign [tx-hex]: Sign transaction.');
this.log(' $ zap [age?]: Zap pending wallet TXs.');
this.log(' $ abandon [hash]: Abandon a transaction.');
this.log(' $ tx [hash]: View transaction details.');
this.log(' $ blocks: List wallet blocks.');
this.log(' $ block [height]: View wallet block.');
Expand Down
Loading

0 comments on commit 7b47913

Please sign in to comment.