lib/zold/txns.rb in zold-0.14.52 vs lib/zold/txns.rb in zold-0.14.53
- old
+ new
@@ -19,11 +19,10 @@
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
require_relative 'txn'
-require_relative 'atomic_file'
# Transactions in a wallet.
# Author:: Yegor Bugayenko (yegor256@gmail.com)
# Copyright:: Copyright (c) 2018 Yegor Bugayenko
# License:: MIT
@@ -38,10 +37,10 @@
# nothing
end
def fetch
raise "Wallet file '#{@file}' is absent" unless File.exist?(@file)
- lines = AtomicFile.new(@file).read.split(/\n/)
+ lines = File.read(@file).split(/\n/)
raise "Not enough lines in #{@file}, just #{lines.count}" if lines.count < 4
lines.drop(5)
.each_with_index
.map { |line, i| Txn.parse(line, i + 6) }
.sort