|
33 | 33 | import haveno.cli.opts.OfferIdOptionParser;
|
34 | 34 | import haveno.cli.opts.OptLabel;
|
35 | 35 | import haveno.cli.opts.RegisterDisputeAgentOptionParser;
|
36 |
| -import haveno.cli.opts.RelayXmrTxOptionParser; |
| 36 | +import haveno.cli.opts.RelayXmrTxsOptionParser; |
37 | 37 | import haveno.cli.opts.RemoveWalletPasswordOptionParser;
|
38 | 38 | import haveno.cli.opts.SetWalletPasswordOptionParser;
|
39 | 39 | import haveno.cli.opts.SimpleMethodOptionParser;
|
|
71 | 71 | import static haveno.cli.Method.getxmrnewsubaddress;
|
72 | 72 | import static haveno.cli.Method.getxmrtxs;
|
73 | 73 | import static haveno.cli.Method.createxmrtx;
|
74 |
| -import static haveno.cli.Method.relayxmrtx; |
| 74 | +import static haveno.cli.Method.relayxmrtxs; |
75 | 75 | import static haveno.cli.Method.createoffer;
|
76 | 76 | import static haveno.cli.Method.canceloffer;
|
77 | 77 | import static haveno.cli.Method.getoffer;
|
@@ -317,17 +317,17 @@ public static void run(String[] args) {
|
317 | 317 | out.println(tx);
|
318 | 318 | return;
|
319 | 319 | }
|
320 |
| - case relayxmrtx: { |
321 |
| - RelayXmrTxOptionParser optionParser = new RelayXmrTxOptionParser(args); |
322 |
| - OptionSet optionSet = optionParser.parse(args); |
323 |
| - RelayXmrTxOptionParser.RelayXmrTxOptions opts = new RelayXmrTxOptionParser.RelayXmrTxOptions(optionSet); |
| 320 | + case relayxmrtxs: { |
| 321 | + RelayXmrTxsOptionParser optionParser = new RelayXmrTxsOptionParser(args); |
| 322 | + optionParser.parse(); |
| 323 | + RelayXmrTxsOptionParser.RelayXmrTxsOptions opts = optionParser.getRelayXmrTxsOptions(); |
324 | 324 | if (opts.isForHelp()) {
|
325 | 325 | out.println(client.getMethodHelp(method));
|
326 | 326 | return;
|
327 | 327 | }
|
328 |
| - String metadata = opts.getMetadata(); |
329 |
| - String hash = client.relayXmrTx(metadata); |
330 |
| - out.println(hash); |
| 328 | + List<String> metadatas = opts.getMetadatas(); |
| 329 | + List<String> hashes = client.relayXmrTxs(metadatas); |
| 330 | + hashes.forEach(hash -> out.println(hash)); |
331 | 331 | return;
|
332 | 332 | }
|
333 | 333 | case createoffer: {
|
@@ -759,7 +759,7 @@ private static void printHelp(OptionParser parser, PrintStream stream) {
|
759 | 759 | stream.println();
|
760 | 760 | stream.format(rowFormat, createxmrtx.name(), "--destinations=<destinations>", "Create XMR transaction");
|
761 | 761 | stream.println();
|
762 |
| - stream.format(rowFormat, relayxmrtx.name(), "--metadata=<metadata>", "Relay XMR transaction"); |
| 762 | + stream.format(rowFormat, relayxmrtxs.name(), "--metadatas=<metadatas>", "Relay XMR transactions"); |
763 | 763 | stream.println();
|
764 | 764 | stream.format(rowFormat, createoffer.name(), "--payment-account=<payment-account-id> \\", "Create and place an offer");
|
765 | 765 | stream.format(rowFormat, "", "--direction=<buy|sell> \\", "");
|
|
0 commit comments