Skip to content

Commit

Permalink
#819 check
Browse files Browse the repository at this point in the history
  • Loading branch information
davvd committed Nov 30, 2023
1 parent 8a947ba commit f9cd840
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions lib/zold/wallets.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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|
Expand Down
2 changes: 1 addition & 1 deletion test/test_upgrades.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f9cd840

Please sign in to comment.