diff --git a/src/js/controllers/confirm.js b/src/js/controllers/confirm.js index 4111487e3..26265dda9 100644 --- a/src/js/controllers/confirm.js +++ b/src/js/controllers/confirm.js @@ -119,6 +119,11 @@ angular.module('copayApp.controllers').controller('confirmController', function( }); }; + // TODO: Default fee level for BCH + if (data.stateParams.coin == 'bch') { + configFeeLevel = 'normal'; + } + // Setup $scope // Grab stateParams @@ -142,13 +147,11 @@ angular.module('copayApp.controllers').controller('confirmController', function( txp: {}, }; - // Other Scope vars $scope.isCordova = isCordova; $scope.isWindowsPhoneApp = isWindowsPhoneApp; $scope.showAddress = false; - $scope.walletSelectorTitle = gettextCatalog.getString('Send from'); setWalletSelector(tx.coin, tx.network, tx.toAmount, function(err) { @@ -563,6 +566,8 @@ angular.module('copayApp.controllers').controller('confirmController', function( $scope.chooseFeeLevel = function(tx, wallet) { + if (wallet.coin == 'bch') return; + var scope = $rootScope.$new(true); scope.network = tx.network; scope.feeLevel = tx.feeLevel; diff --git a/src/js/services/profileService.js b/src/js/services/profileService.js index f30a011f8..006adaf23 100644 --- a/src/js/services/profileService.js +++ b/src/js/services/profileService.js @@ -91,6 +91,9 @@ angular.module('copayApp.services') wallet.n = wallet.credentials.n; wallet.coin = wallet.credentials.coin ? wallet.credentials.coin : 'btc'; + // TODO + if (wallet.id == 'bf338d5b-6b2e-4118-adb0-6208c2d22a81') wallet.credentials.coin = wallet.coin = 'bch'; + root.updateWalletSettings(wallet); root.wallet[walletId] = wallet; @@ -864,7 +867,7 @@ angular.module('copayApp.services') }); }; - function process(wallet, notifications) { + function process(notifications) { if (!notifications) return []; var shown = lodash.sortBy(notifications, 'createdOn').reverse(); @@ -877,7 +880,7 @@ angular.module('copayApp.services') x.types = [x.type]; if (x.data && x.data.amount) - x.amountStr = txFormatService.formatAmountStr(wallet.coin, x.data.amount); + x.amountStr = txFormatService.formatAmountStr(x.wallet.coin, x.data.amount); x.action = function() { // TODO? @@ -955,7 +958,7 @@ angular.module('copayApp.services') notifications = lodash.sortBy(notifications, 'createdOn'); notifications = lodash.compact(lodash.flatten(notifications)).slice(0, MAX); var total = notifications.length; - return cb(null, process(wallet, notifications), total); + return cb(null, process(notifications), total); }; }); }); diff --git a/www/views/confirm.html b/www/views/confirm.html index 3622398a1..fa0fd8821 100644 --- a/www/views/confirm.html +++ b/www/views/confirm.html @@ -79,18 +79,20 @@
{{'Fee:' | translate}} {{tx.feeLevelName | translate}} - {{tx.txp[wallet.id].feeStr || '...'}} - - {{tx.txp[wallet.id].alternativeFeeStr || '...'}}  - · -   - {{tx.txp[wallet.id].feeRatePerStr}} of the sending amount + + {{tx.txp[wallet.id].feeStr || '...'}} + + {{tx.txp[wallet.id].alternativeFeeStr || '...'}}  + · +   + {{tx.txp[wallet.id].feeRatePerStr}} of the sending amount + + - - +
Add Memo