Skip to content
Snippets Groups Projects
Select Git revision
  • 4e451756cc61fc58839fc68c20400f31de7f29a7
  • master default protected
  • network/gtest-1000 protected
  • upgradable-multisig
  • runtime/gtest-1000
  • network/gdev-800 protected
  • cgeek/issue-297-cpu
  • gdev-800-tests
  • update-docker-compose-rpc-squid-names
  • fix-252
  • 1000i100-test
  • hugo/tmp-0.9.1
  • network/gdev-803 protected
  • hugo/endpoint-gossip
  • network/gdev-802 protected
  • hugo/distance-precompute
  • network/gdev-900 protected
  • tuxmain/anonymous-tx
  • debug/podman
  • hugo/195-doc
  • hugo/195-graphql-schema
  • gtest-1000 protected
  • gdev-900-0.10.1 protected
  • gdev-900-0.10.0 protected
  • gdev-900-0.9.2 protected
  • gdev-800-0.8.0 protected
  • gdev-900-0.9.1 protected
  • gdev-900-0.9.0 protected
  • gdev-803 protected
  • gdev-802 protected
  • runtime-801 protected
  • gdev-800 protected
  • runtime-800-bis protected
  • runtime-800 protected
  • runtime-800-backup protected
  • runtime-701 protected
  • runtime-700 protected
  • runtime-600 protected
  • runtime-500 protected
  • v0.4.1 protected
  • runtime-401 protected
41 results

main.rs

Blame
  • wallet-controllers.js 11.38 KiB
    
    angular.module('cesium.wallet.controllers', ['cesium.services', 'cesium.currency.controllers'])
    
      .config(function($stateProvider) {
        'ngInject';
        $stateProvider
    
          .state('app.view_wallet', {
            url: "/wallet",
            views: {
              'menuContent': {
                templateUrl: "templates/wallet/view_wallet.html",
                controller: 'WalletCtrl'
              }
            }
          })
    
          .state('app.view_wallet_tx_errors', {
            url: "/wallet/tx/errors",
            views: {
              'menuContent': {
                templateUrl: "templates/wallet/view_wallet_tx_error.html",
                controller: 'WalletTxErrorCtrl'
              }
            }
          })
        ;
      })
    
      .controller('WalletCtrl', WalletController)
    
      .controller('WalletTxErrorCtrl', WalletTxErrorController)
    ;
    
    function WalletController($scope, $q, $ionicPopup, $timeout, $state, $ionicHistory, screenmatch,
      UIUtils, Wallet, $translate, $ionicPopover, Modals, csSettings, BMA) {
      'ngInject';
    
      $scope.walletData = null;
      $scope.convertedBalance = null;
      $scope.hasCredit = false;
      $scope.showDetails = false;
      $scope.loading = true;
    
      $scope.$on('$ionicView.enter', function() {
        $scope.loadWallet()
          .then(function(walletData) {
            $scope.walletData = walletData;
            $scope.updateView();
            $scope.loading=false;
            $scope.showFab('fab-transfer');
            $scope.showQRCode('qrcode', walletData.pubkey, 1100);
            UIUtils.loading.hide(); // loading could have be open (e.g. new account)
          })
          .catch(function(err){
            if ('CANCELLED' === err) {
              $ionicHistory.nextViewOptions({
                historyRoot: true
              });
              $state.go('app.home');
            }
          });
      });
    
      $ionicPopover.fromTemplateUrl('templates/wallet/popover_actions.html', {
        scope: $scope
      }).then(function(popover) {
        $scope.actionsPopover = popover;
      });