lib/zold/commands/pay.rb in zold-0.22.8 vs lib/zold/commands/pay.rb in zold-0.22.9
- old
+ new
@@ -55,10 +55,13 @@
Available options:"
o.string '--private-key',
'The location of RSA private key (default: ~/.ssh/id_rsa)',
require: true,
default: File.expand_path('~/.ssh/id_rsa')
+ o.string '--network',
+ 'The name of the network we work in',
+ default: 'test'
o.bool '--force',
'Ignore all validations',
default: false
o.string '--time',
"Time of transaction (default: #{Time.now.utc.iso8601})",
@@ -83,10 +86,10 @@
raise 'Recepient\'s invoice or wallet ID is required as the second argument' if mine[1].nil?
invoice = mine[1]
unless invoice.include?('@')
require_relative 'invoice'
invoice = Invoice.new(wallets: @wallets, remotes: @remotes, copies: @copies, log: @log).run(
- ['invoice', invoice, "--tolerate-quorum=#{opts['tolerate-quorum']}"] +
+ ['invoice', invoice, "--tolerate-quorum=#{opts['tolerate-quorum']}", "--network=#{opts['network']}"] +
(opts['tolerate-edges'] ? ['--tolerate-edges'] : [])
)
end
raise 'Amount is required (in ZLD) as the third argument' if mine[2].nil?
amount = Amount.new(zld: mine[2].to_f)