lib/zold/node/front.rb in zold-0.16.24 vs lib/zold/node/front.rb in zold-0.16.25
- old
+ new
@@ -465,15 +465,12 @@
yield wallet
end
end
def copy_of(id)
- Tempfile.open([id.to_s, Wallet::EXT]) do |f|
- settings.wallets.find(id) do |wallet|
- error(404, "Wallet ##{id} doesn't exist on the node") unless wallet.exists?
- IO.write(f, IO.read(wallet.path))
- end
- yield Wallet.new(f.path)
+ settings.wallets.acq(id) do |wallet|
+ error(404, "Wallet ##{id} doesn't exist on the node") unless wallet.exists?
+ yield wallet
end
end
def running_server?
false