Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: gRPC to change swap status (#500)
* feat: add setswapstatus to boltz-cli This commit adds a new `boltz-cli setswapstatus <swapID> <status>` command to update swap statuses manually. Closes #495 * fixup! feat: add setswapstatus to boltz-cli * fixup! feat: add setswapstatus to boltz-cli * fixup! feat: add setswapstatus to boltz-cli
- Loading branch information
Showing
11 changed files
with
526 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { Arguments } from 'yargs'; | ||
import { SetSwapStatusRequest } from '../../proto/boltzrpc_pb'; | ||
import { callback, loadBoltzClient } from '../Command'; | ||
|
||
export const command = 'setswapstatus <id> <status>'; | ||
|
||
export const describe = 'changes swap status in the database'; | ||
|
||
export const builder = { | ||
id: { | ||
type: 'string', | ||
describe: 'ID of the swap', | ||
}, | ||
status: { | ||
type: 'string', | ||
describe: 'swap status', | ||
}, | ||
}; | ||
|
||
export const handler = (argv: Arguments<any>): void => { | ||
const request = new SetSwapStatusRequest(); | ||
|
||
request.setId(argv.id); | ||
request.setStatus(argv.status); | ||
|
||
loadBoltzClient(argv).setSwapStatus(request, callback()); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.