stellar_core_commander 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 69125ec58eb849d896c5fc814cc969c81a1cb652
4
- data.tar.gz: b60d9215848229eb69ead17594c59a84147bc8f6
3
+ metadata.gz: 90f848e6fbf3df12ae86932ebc4f9eea1d9ddfde
4
+ data.tar.gz: 59ce2eb409cb1bf04b8608a692c3e5190e440953
5
5
  SHA512:
6
- metadata.gz: c14d87026ec3a2d740a92467f20825f748ac288b29d9c40c9f9b6d26f41c61991da9e46c92cd72e1772f4ba82baca6f644201dc98ce3bea1e7f88b52998f7c21
7
- data.tar.gz: ff2c49f39722e4e717be0567aa29d2d01d6402942f7cb3b28dc039b702465658cf5878a204c70d88f34be30c5a6fa97b059b1fa8e0a57c0713cbab3afd4988bd
6
+ metadata.gz: de9a030a41d6bf6af50fb40d350e4ea829ff81fc544666d0ce052a287aa3793a5a01be3e8e5a66742aba650e4d9fdee06440bf65640562ea988aba949206c0a3
7
+ data.tar.gz: dcb99f43b91c2df3eafcdf6faa5e54a248ec93a09766da36f8bbab9a0ef8c54ea77d0b0b1fe3cf636370783574698f95a38e597dd8c401455c73a812f0bb3d48
@@ -84,6 +84,8 @@ module StellarCoreCommander
84
84
  else
85
85
  taker_pays = make_currency currencies[:buy]
86
86
  taker_gets = make_currency currencies[:with]
87
+ price = 1 / price
88
+ amount = (amount * price).floor
87
89
  end
88
90
 
89
91
  Stellar::Transaction.create_offer({
@@ -181,7 +181,7 @@ module StellarCoreCommander
181
181
  # ensure success for every operation
182
182
  expected = Stellar::TransactionResultCode.tx_success
183
183
  actual = result.result.code
184
- raise "transaction failed" unless expected == actual
184
+ raise "transaction failed: #{base64_result}" unless expected == actual
185
185
 
186
186
  result
187
187
  end
@@ -1,3 +1,3 @@
1
1
  module StellarCoreCommander
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
17
17
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
18
18
  spec.require_paths = ["lib"]
19
19
 
20
- spec.add_dependency "stellar-base", "= 0.0.5"
20
+ spec.add_dependency "stellar-base", "= 0.0.6"
21
21
  spec.add_dependency "slop", "~> 3.6.0"
22
22
  spec.add_dependency "faraday", "~> 0.9.1"
23
23
  spec.add_dependency "faraday_middleware", "~> 0.9.1"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stellar_core_commander
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Fleckenstein
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-07 00:00:00.000000000 Z
11
+ date: 2015-05-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: stellar-base
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.0.5
19
+ version: 0.0.6
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 0.0.5
26
+ version: 0.0.6
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: slop
29
29
  requirement: !ruby/object:Gem::Requirement