Ejemplo n.º 1
0
 def allowance(self):
     owner = self.data.get('allowance_owner')
     spender = self.data.get('allowance_spender')
     if spender:  # owner will default if omitted
         res = self.vm.allowance(owner, spender)
         self._scene.add_effect(
             PopUpDialog(self._screen, res, ['OK'], has_shadow=True))
Ejemplo n.º 2
0
 def register(self):
     url = self.data.get('register_url')
     gas_price = self.data.get('gas_price')
     if url and gas_price:
         res = self.vm.register(url, gas_price)
         self._scene.add_effect(
             PopUpDialog(self._screen, res, ['OK'], has_shadow=True))
Ejemplo n.º 3
0
 def resolve_registration(self):
     hash = self.data.get('resolve_hash')
     gas_price = self.data.get('gas_price')
     if hash and gas_price:
         res = self.vm.resolve_registration(hash, gas_price)
         self._scene.add_effect(
             PopUpDialog(self._screen, res, ['OK'], has_shadow=True))
Ejemplo n.º 4
0
 def set_backend_url(self):
     url = self.data.get('set_backend_url')
     gas_price = self.data.get('gas_price')
     if url and gas_price:
         res = self.vm.set_backend_url(url, gas_price)
         self._scene.add_effect(
             PopUpDialog(self._screen, res, ['OK'], has_shadow=True))
Ejemplo n.º 5
0
 def list(self):
     hash = self.data.get('list_hash')
     gas_price = self.data.get('gas_price')
     if hash and gas_price:
         res = self.vm.list(hash, gas_price)
         self._scene.add_effect(
             PopUpDialog(self._screen, res, ['OK'], has_shadow=True))
Ejemplo n.º 6
0
 def support(self):
     offer = self.data.get('support_offer')
     gas_price = self.data.get('gas_price')
     if offer and gas_price:
         res = self.vm.support(offer, gas_price)
         self._scene.add_effect(
             PopUpDialog(self._screen, res, ['OK'], has_shadow=True))
Ejemplo n.º 7
0
 def claim_access_reward(self):
     hash = self.data.get('claim_hash')
     gas_price = self.data.get('gas_price')
     if hash and gas_price:
         res = self.vm.claim_access_reward(hash, gas_price)
         self._scene.add_effect(
             PopUpDialog(self._screen, res, ['OK'], has_shadow=True))
Ejemplo n.º 8
0
 def set_privileged(self):
     listing = self.data.get('set_privileged_listing')
     gas_price = self.data.get('gas_price')
     if listing and gas_price:
         res = self.vm.set_privileged(listing, gas_price)
         self._scene.add_effect(
             PopUpDialog(self._screen, res, ['OK'], has_shadow=True))
Ejemplo n.º 9
0
 def vote(self):
     hash = self.data.get('vote_hash')
     option = self.data.get('vote_option')
     gas_price = self.data.get('gas_price')
     if hash and option and gas_price:
         res = self.vm.vote(hash, option, gas_price)
         self._scene.add_effect(PopUpDialog(self._screen, res, ['OK'], has_shadow=True))
Ejemplo n.º 10
0
 def request_delivery(self):
     hash = self.data.get('request_delivery_hash')
     amount = self.data.get('request_delivery_amount')
     gas_price = self.data.get('gas_price')
     if hash and amount and gas_price:
         res = self.vm.request_delivery(hash, amount, gas_price)
         self._scene.add_effect(
             PopUpDialog(self._screen, res, ['OK'], has_shadow=True))
Ejemplo n.º 11
0
 def set_data_hash(self):
     listing = self.data.get('set_data_hash_listing')
     data = self.data.get('set_data_hash_data')
     gas_price = self.data.get('gas_price')
     if listing and data and gas_price:
         res = self.vm.set_data_hash(listing, data, gas_price)
         self._scene.add_effect(
             PopUpDialog(self._screen, res, ['OK'], has_shadow=True))
Ejemplo n.º 12
0
 def reparameterize(self):
     param = self.data.get('reparameterize_param')
     value = self.data.get('reparameterize_value')
     gas_price = self.data.get('gas_price')
     if param and value and gas_price:
         res = self.vm.reparameterize(param, value, gas_price)
         self._scene.add_effect(
             PopUpDialog(self._screen, res, ['OK'], has_shadow=True))
Ejemplo n.º 13
0
 def withdraw_from_listing(self):
     hash = self.data.get('withdraw_hash')
     amount = self.data.get('withdraw_amount')
     gas_price = self.data.get('gas_price')
     if hash and amount and gas_price:
         res = self.vm.withdraw_from_listing(hash, amount, gas_price)
         self._scene.add_effect(
             PopUpDialog(self._screen, res, ['OK'], has_shadow=True))
Ejemplo n.º 14
0
 def delivered(self):
     hash = self.data.get('delivered_hash')
     url = self.data.get('delivered_url')
     gas_price = self.data.get('gas_price')
     if hash and url and gas_price:
         res = self.vm.delivered(hash, url, gas_price)
         self._scene.add_effect(
             PopUpDialog(self._screen, res, ['OK'], has_shadow=True))
Ejemplo n.º 15
0
 def decrease_allowance(self):
     spender = self.data.get('decrease_allowance_spender')
     amount = self.data.get('decrease_allowance_amount')
     gas_price = self.data.get('gas_price')
     if spender and amount and gas_price:
         res = self.vm.decrease_allowance(spender, amount, gas_price)
         self._scene.add_effect(
             PopUpDialog(self._screen, res, ['OK'], has_shadow=True))
Ejemplo n.º 16
0
 def transfer(self):
     to = self.data.get('transfer_to')
     amount = self.data.get('transfer_amount')
     gas_price = self.data.get('gas_price')
     if to and amount and gas_price:
         res = self.vm.transfer(to, amount, gas_price)
         self._scene.add_effect(
             PopUpDialog(self._screen, res, ['OK'], has_shadow=True))
Ejemplo n.º 17
0
 def set_privileged(self):
     parameterizer = self.data.get('set_privileged_parameterizer')
     datatrust = self.data.get('set_privileged_datatrust')
     listing = self.data.get('set_privileged_listing')
     gas_price = self.data.get('gas_price')
     if parameterizer and datatrust and listing and gas_price:
         res = self.vm.set_privileged(parameterizer, datatrust, listing, gas_price)
         self._scene.add_effect(PopUpDialog(self._screen, res, ['OK'], has_shadow=True))
Ejemplo n.º 18
0
 def transfer_from(self):
     source = self.data.get('transfer_from_source')
     to = self.data.get('transfer_from_to')
     amount = self.data.get('transfer_from_amount')
     gas_price = self.data.get('gas_price')
     if source and to and amount and gas_price:
         res = self.vm.transfer_from(source, to, amount, gas_price)
         self._scene.add_effect(
             PopUpDialog(self._screen, res, ['OK'], has_shadow=True))
Ejemplo n.º 19
0
 def listing_accessed(self):
     listing = self.data.get('listing_accessed_listing')
     delivery = self.data.get('listing_accessed_delivery')
     amount = self.data.get('listing_accessed_amount')
     gas_price = self.data.get('gas_price')
     if listing and delivery and amount and gas_price:
         res = self.vm.listing_accessed(listing, delivery, amount,
                                        gas_price)
         self._scene.add_effect(
             PopUpDialog(self._screen, res, ['OK'], has_shadow=True))
Ejemplo n.º 20
0
 def balance_of(self):
     owner = self.data.get(
         'balance_of_owner')  # can be blank, will default to env
     res = self.vm.balance_of(owner)
     self._scene.add_effect(
         PopUpDialog(self._screen, res, ['OK'], has_shadow=True))
Ejemplo n.º 21
0
 def total_supply(self):
     res = self.vm.total_supply()
     self._scene.add_effect(
         PopUpDialog(self._screen, res, ['OK'], has_shadow=True))
Ejemplo n.º 22
0
 def get_decimals(self):
     res = self.vm.get_decimals()
     self._scene.add_effect(
         PopUpDialog(self._screen, res, ['OK'], has_shadow=True))
Ejemplo n.º 23
0
 def get_symbol(self):
     # we'll use the viewmodel to relay commands
     res = self.vm.get_symbol()
     self._scene.add_effect(
         PopUpDialog(self._screen, res, ['OK'], has_shadow=True))
Ejemplo n.º 24
0
 def get_bytes_purchased(self):
     addr = self.data.get('get_bytes_purchased_addr')
     # we'll use the viewmodel to relay commands
     res = self.vm.get_bytes_purchased(addr)
     self._scene.add_effect(
         PopUpDialog(self._screen, res, ['OK'], has_shadow=True))
Ejemplo n.º 25
0
 def get_delivery(self):
     hash = self.data.get('get_delivery_hash')
     res = self.vm.get_delivery(hash)
     self._scene.add_effect(
         PopUpDialog(self._screen, res, ['OK'], has_shadow=True))
Ejemplo n.º 26
0
 def get_access_reward_earned(self):
     hash = self.data.get('get_access_reward_hash')
     res = self.vm.get_access_reward_earned(hash)
     self._scene.add_effect(
         PopUpDialog(self._screen, res, ['OK'], has_shadow=True))
Ejemplo n.º 27
0
 def get_privileged(self):
     res = self.vm.get_privileged()
     self._scene.add_effect(
         PopUpDialog(self._screen, res, ['OK'], has_shadow=True))
Ejemplo n.º 28
0
 def deposit(self):
     amount = self.data.get('deposit_amount')
     gas_price = self.data.get('gas_price')
     if amount and gas_price:
         res = self.vm.deposit(amount, gas_price)
         self._scene.add_effect(PopUpDialog(self._screen, res, ['OK'], has_shadow=True))
Ejemplo n.º 29
0
 def withdraw(self):
     amount = self.data.get('withdraw_amount')
     gas_price = self.data.get('gas_price')
     if amount and gas_price:
         res = self.vm.withdraw(amount, gas_price)
         self._scene.add_effect(PopUpDialog(self._screen, res, ['OK'], has_shadow=True))
Ejemplo n.º 30
0
 def get_hash(self):
     url = self.data.get('get_hash_url')
     res = self.vm.get_hash(url)
     self._scene.add_effect(
         PopUpDialog(self._screen, res, ['OK'], has_shadow=True))