Skip to content

Commit

Permalink
fix param with sqlite3 update
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas Germain committed Apr 20, 2024
1 parent f514403 commit 9615243
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion huginn_callisto_network_agent.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)

Gem::Specification.new do |spec|
spec.name = "huginn_callisto_network_agent"
spec.version = '0.1.89'
spec.version = '0.1.90'
spec.authors = ["Nicolas Germain"]
spec.email = ["ngermain@hihouhou.com"]

Expand Down
6 changes: 3 additions & 3 deletions lib/huginn_callisto_network_agent/callisto_network_agent.rb
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ def find_symbol(contract)
def owner_finder(address=interpolated['wallet'])

db = SQLite3::Database.new(interpolated['sql_db'])
result = db.get_first_row('SELECT name FROM directory WHERE address = ?', address)
result = db.get_first_row('SELECT name FROM directory WHERE address = ?', [address])
db.close

if result
Expand All @@ -217,14 +217,14 @@ def owner_finder(address=interpolated['wallet'])
def function_finder(contract_address=interpolated['wallet'],bytes_signature)

db = SQLite3::Database.new(interpolated['sql_db'])
result = db.get_first_row('SELECT text_signature FROM signatures WHERE bytes_signature = ? AND contract_address = ?', bytes_signature, contract_address)
result = db.get_first_row('SELECT text_signature FROM signatures WHERE bytes_signature = ? AND contract_address = ?', [bytes_signature, contract_address])
db.close

if result
return result[0].split('(').first
else
db = SQLite3::Database.new(interpolated['sql_db'])
result = db.get_first_row('SELECT text_signature FROM signatures WHERE bytes_signature = ?', bytes_signature)
result = db.get_first_row('SELECT text_signature FROM signatures WHERE bytes_signature = ?', [bytes_signature])
db.close
if result
return result[0].split('(').first
Expand Down

0 comments on commit 9615243

Please sign in to comment.