Skip to content

Commit 7f8ea24

Browse files
committed
Add ETH estimates
1 parent 5c14833 commit 7f8ea24

File tree

4 files changed

+27
-2
lines changed

4 files changed

+27
-2
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.7.1] - 2021-07-16
9+
10+
### Added
11+
12+
- Add support for Ethereum estimates
813
## [1.7.0] - 2021-07-14
914

1015
### Changed

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
patch_ruby (1.7.0)
4+
patch_ruby (1.7.1)
55
json (~> 2.1, >= 2.1.0)
66
typhoeus (~> 1.0, >= 1.0.1)
77

lib/patch_ruby/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@
1111
=end
1212

1313
module Patch
14-
VERSION = '1.7.0'
14+
VERSION = '1.7.1'
1515
end

spec/integration/estimates_spec.rb

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,24 @@
9999
expect(bitcoin_estimate.data.type).to eq 'bitcoin'
100100
expect(bitcoin_estimate.data.mass_g).to be < bitcoin_estimate_2.data.mass_g
101101
end
102+
103+
it 'supports creating ethereum estimates with a gas amount' do
104+
ethereum_estimate = Patch::Estimate.create_ethereum_estimate(
105+
gas_used: 100
106+
)
107+
108+
ethereum_estimate_2 = Patch::Estimate.create_ethereum_estimate(
109+
gas_used: 1000
110+
)
111+
112+
expect(ethereum_estimate.data.type).to eq 'ethereum'
113+
expect(ethereum_estimate.data.mass_g).to be < ethereum_estimate_2.data.mass_g
114+
end
115+
116+
it 'supports creating ethereum estimates with partial information' do
117+
ethereum_estimate = Patch::Estimate.create_ethereum_estimate({ create_order: false })
118+
119+
expect(ethereum_estimate.data.type).to eq 'ethereum'
120+
expect(ethereum_estimate.data.mass_g).to be >= 2_000
121+
end
102122
end

0 commit comments

Comments
 (0)