Class: Solrengine::Ui::SendTransactionFormComponent

Inherits:
ViewComponent::Base
  • Object
show all
Defined in:
app/components/solrengine/ui/send_transaction_form_component.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(wallet_address: nil, network: "devnet", action_url: "/transfers") ⇒ SendTransactionFormComponent

Returns a new instance of SendTransactionFormComponent.



8
9
10
11
12
# File 'app/components/solrengine/ui/send_transaction_form_component.rb', line 8

def initialize(wallet_address: nil, network: "devnet", action_url: "/transfers")
  @wallet_address = wallet_address
  @network = network
  @action_url = action_url
end

Instance Attribute Details

#action_urlObject (readonly)

Returns the value of attribute action_url.



6
7
8
# File 'app/components/solrengine/ui/send_transaction_form_component.rb', line 6

def action_url
  @action_url
end

#networkObject (readonly)

Returns the value of attribute network.



6
7
8
# File 'app/components/solrengine/ui/send_transaction_form_component.rb', line 6

def network
  @network
end

#wallet_addressObject (readonly)

Returns the value of attribute wallet_address.



6
7
8
# File 'app/components/solrengine/ui/send_transaction_form_component.rb', line 6

def wallet_address
  @wallet_address
end

Instance Method Details

#connected?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'app/components/solrengine/ui/send_transaction_form_component.rb', line 14

def connected?
  wallet_address.present?
end