trident_assistant 0.1.5 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: faafb75ae81c3fb5817c1859ec5a745a9789496cbf6389bae0f33988efc80b8f
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 6baa5f0723e33045b3692ee059f6b6cdfcd838ab032882f61297579de4593885
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 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, ** 
     | 
| 
      
 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( 
     | 
| 
      
 38 
     | 
    
         
            +
                          split: kwargs[:split].to_f.round(4),
         
     | 
| 
       38 
39 
     | 
    
         
             
                          icon_base64: kwargs[:icon_base64],
         
     | 
| 
       39 
40 
     | 
    
         
             
                          icon_url: kwargs[:icon_url]
         
     | 
| 
       40 
41 
     | 
    
         
             
                        }
         
     | 
| 
         @@ -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:  
     | 
| 
      
 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
         
     | 
    
        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. 
     | 
| 
      
 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- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2022-11-17 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: mixin_bot
         
     |