vendi 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/vendi +7 -3
- data/lib/vendi/machine.rb +1 -1
- data/lib/vendi/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4b6e8fbf628bc618da176a73c2f7e77d9ff300bb022dc8dfbe672e5fe3e7e1a1
|
4
|
+
data.tar.gz: 4c1d42a3aecf7eace980b4d91c2b5ff8378cc22d5fac64ad7b671cdcabf8490f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c98f5cec080dfe60b0258963a81bd2bdd17e6545b5f93b8e64819ab6827fe77e2e3d607997199543e48eaedc130b004cdde0941e9818703220e985deb78b7999
|
7
|
+
data.tar.gz: cb5354b00b067303470076e72b9368e2664b5fa2c75cb4ac7ba902b4433c1b6d7d65e7fd5aebd235f393fd11d4d3d6cfd1f95a2b7fed0927deafe617ea69e7d1
|
data/bin/vendi
CHANGED
@@ -8,7 +8,7 @@ doc = <<~DOCOPT
|
|
8
8
|
Vendi - CNFT Vending Machine.
|
9
9
|
|
10
10
|
Usage:
|
11
|
-
#{File.basename(__FILE__)} fill --collection <name> --price <lovelace> --nft-count <int> [--wallet-port <port>]
|
11
|
+
#{File.basename(__FILE__)} fill --collection <name> --price <lovelace> --nft-count <int> [--wallet-port <port>] [--skip-wallet-creation]
|
12
12
|
#{File.basename(__FILE__)} serve --collection <name> [--wallet-port <port>] [--logfile <file>]
|
13
13
|
#{File.basename(__FILE__)} -v | --version
|
14
14
|
#{File.basename(__FILE__)} -h | --help
|
@@ -40,7 +40,6 @@ DOCOPT
|
|
40
40
|
|
41
41
|
begin
|
42
42
|
o = Docopt.docopt(doc)
|
43
|
-
|
44
43
|
warn Vendi::VERSION if o['--version']
|
45
44
|
|
46
45
|
if o['fill']
|
@@ -48,6 +47,7 @@ begin
|
|
48
47
|
price = o['--price']
|
49
48
|
nft_count = o['--nft-count']
|
50
49
|
wallet_port = o['--wallet-port']
|
50
|
+
skip_wallet = o['--skip-wallet-creation']
|
51
51
|
vendi = Vendi.init({ port: wallet_port.to_i })
|
52
52
|
begin
|
53
53
|
if File.directory?(File.join(vendi.config_dir, collection_name))
|
@@ -55,7 +55,11 @@ begin
|
|
55
55
|
yn = $stdin.gets.chomp
|
56
56
|
raise Interrupt unless %w[y Y].include?(yn)
|
57
57
|
end
|
58
|
-
|
58
|
+
if skip_wallet
|
59
|
+
vendi.fill(collection_name, price, nft_count, skip_wallet: true)
|
60
|
+
else
|
61
|
+
vendi.fill(collection_name, price, nft_count)
|
62
|
+
end
|
59
63
|
rescue StandardError => e
|
60
64
|
vendi.logger.error e.message
|
61
65
|
rescue Interrupt
|
data/lib/vendi/machine.rb
CHANGED
@@ -156,7 +156,7 @@ module Vendi
|
|
156
156
|
|
157
157
|
txs_new = get_incoming_txs(wid)
|
158
158
|
if txs.size < txs_new.size
|
159
|
-
txs_to_check = get_transactions_to_process(
|
159
|
+
txs_to_check = get_transactions_to_process(txs_new, txs)
|
160
160
|
@logger.info "New txs arrived: #{txs_to_check.size}"
|
161
161
|
@logger.info (txs_to_check.map { |t| t['id'] }).to_s
|
162
162
|
|
data/lib/vendi/version.rb
CHANGED