diff --git a/lib/zold/wallets.rb b/lib/zold/wallets.rb index 75d7db17..8d4fd1c9 100644 --- a/lib/zold/wallets.rb +++ b/lib/zold/wallets.rb @@ -52,6 +52,11 @@ def path File.expand_path(@dir) end + # This wallet exists? + def exists?(id) + File.exist?(File.join(path, id.to_s + Wallet::EXT)) + end + # Returns the list of their IDs (as plain text) def all DirItems.new(path).fetch(recursive: false).select do |f| diff --git a/test/test_upgrades.rb b/test/test_upgrades.rb index 4c3e58f1..cace2ecf 100755 --- a/test/test_upgrades.rb +++ b/test/test_upgrades.rb @@ -75,7 +75,7 @@ def test_already_ran_scripts_dont_run private def run_upgrades(dir) - Zold::Upgrades.new(version_file(dir), dir, {}, network: 'test').run + Zold::Upgrades.new(version_file(dir), dir, { network: 'test' }).run end def version_file(dir)