trident_assistant 0.1.5 → 0.1.8

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
  SHA256:
3
- metadata.gz: f4acb50cc313a7bb9bde2830d586acd3264ad6342d19db8f33c3771c2bc50960
4
- data.tar.gz: f1929e1fd73134237592eb08d8bc8297fb15ed5b44201deb411499880f4360d4
3
+ metadata.gz: faafb75ae81c3fb5817c1859ec5a745a9789496cbf6389bae0f33988efc80b8f
4
+ data.tar.gz: 6baa5f0723e33045b3692ee059f6b6cdfcd838ab032882f61297579de4593885
5
5
  SHA512:
6
- metadata.gz: 92abe8ed87e80f6a0b5733b31ebdc5393d615b3f8de846d5a68194c4e767faf9d516b57452d2733e3c068ba6b49e7e5513144a888a4bfa5ce2429f4780957636
7
- data.tar.gz: f3a8d65af73524216b60970cf98add0c2035bb8fc9c9f2d10d12e16719c8623fb243a1486ffc5e4925d8bfec4c77f39d2186126e148a40fab0bdd7ae9a302892
6
+ metadata.gz: c7fcd3b8706fb80d375d0d9ffea6ac8f21cdbac24cd32bbe9e03074cf262d572b72312ca2abb19b8b61c6a17d5b39bab9df3acf4b33e6c48727048c5a58acb65
7
+ data.tar.gz: 27eebdde0f3996ef85ba7daa2f722de271035fed6c71476eb986a8611fc224393fcd6aea107128a8e469d1b40f33d12bede657858977a4b79a4603f32e8aa3f6
@@ -26,6 +26,7 @@ module TridentAssistant
26
26
  def deposit(collection, token)
27
27
  token_id = MixinBot::Utils::Nfo.new(collection: collection, token: token).unique_token_id
28
28
  collectible = find_collectible(:unspent, token_id)
29
+ collectible ||= find_collectible(:signed, token_id)
29
30
  raise ForbiddenError, "Cannot find collectible" if collectible.blank?
30
31
 
31
32
  nfo = MixinBot::Utils::Nfo.new(extra: "deposit".unpack1("H*")).encode.hex
@@ -72,13 +73,13 @@ module TridentAssistant
72
73
  )
73
74
  end
74
75
 
75
- def transfer(collection, token, recipient, **_kwargs)
76
+ def transfer(collection, token, recipient, **kwargs)
76
77
  token_id = MixinBot::Utils::Nfo.new(collection: collection, token: token).unique_token_id
77
78
  collectible = find_collectible(:unspent, token_id)
78
79
  collectible ||= find_collectible(:signed, token_id)
79
80
  raise ForbiddenError, "Cannot find collectible in wallet" if collectible.blank?
80
81
 
81
- memo = "TRANSFER"
82
+ memo = kwargs[:memo] || "TRANSFER"
82
83
  nfo = MixinBot::Utils::Nfo.new(extra: memo.unpack1("H*")).encode.hex
83
84
 
84
85
  _transfer_nft(
@@ -32,9 +32,10 @@ module TridentAssistant
32
32
  },
33
33
  json: {
34
34
  name: kwargs[:name],
35
+ symbol: kwargs[:symbol],
35
36
  description: kwargs[:description],
36
37
  external_url: kwargs[:external_url],
37
- split: kwargs[:split].to_f.round(2),
38
+ split: kwargs[:split].to_f.round(4),
38
39
  icon_base64: kwargs[:icon_base64],
39
40
  icon_url: kwargs[:icon_url]
40
41
  }
@@ -19,6 +19,7 @@ module TridentAssistant
19
19
  metahash: kwargs[:metahash],
20
20
  state: kwargs[:state],
21
21
  type: kwargs[:type],
22
+ maker_id: kwargs[:maker_id],
22
23
  page: kwargs[:page]
23
24
  }
24
25
  )
@@ -35,7 +35,7 @@ module TridentAssistant
35
35
  options[:headers]["Content-Type"] ||= "application/json"
36
36
 
37
37
  begin
38
- response = HTTP.timeout(connect: 5, write: 10, read: 10).request(verb, uri, options)
38
+ response = HTTP.timeout(connect: 5, write: 120, read: 60).request(verb, uri, options)
39
39
  rescue HTTP::Error => e
40
40
  raise HttpError, e.message
41
41
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TridentAssistant
4
- VERSION = "0.1.5"
4
+ VERSION = "0.1.8"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trident_assistant
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - an-lee
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-05-24 00:00:00.000000000 Z
11
+ date: 2022-11-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mixin_bot