Compatibility for wallets

This commit is contained in:
ssotomayor 2014-10-27 21:05:22 -03:00 committed by Esteban Ordano
commit 202a047edc
3 changed files with 103 additions and 2 deletions

View file

@ -1,7 +1,7 @@
'use strict';
angular.module('copayApp.controllers').controller('ImportController',
function($scope, $rootScope, $location, controllerUtils, Passphrase, notification, isMobile) {
function($scope, $rootScope, $location, controllerUtils, Passphrase, notification, isMobile, Compatibility) {
$rootScope.title = 'Import a backup';
$scope.importStatus = 'Importing wallet - Reading backup...';
@ -94,7 +94,11 @@ angular.module('copayApp.controllers').controller('ImportController',
reader.readAsBinaryString(backupFile);
}
else {
_importBackup(backupText);
try {
_importBackup(backupText);
} catch(e) {
Compatibility.preDotEightImportWalletToStorage(backupText, $scope.password, $scope.skipPublicKeyRing, $scope.skipTxProposals);
}
}
};
});