Skip to content
This repository has been archived by the owner on Nov 21, 2019. It is now read-only.

misc fixes #2187

Merged
merged 2 commits into from
Dec 21, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/scripts/controllers/bulkGenCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var bulkGenCtrl = function($scope) {
$scope.wallets.push(tWallet);
}
$scope.showWallets = true;
$scope.bJSON = globalFuncs.getBlob("text/json;charset=UTF-8",JSON.stringify($scope.jsonWallets));
$scope.bJSON = globalFuncs.getBlob("application/json;charset=UTF-8",JSON.stringify($scope.jsonWallets));
$scope.bTXT = globalFuncs.getBlob("text/plain;charset=UTF-8",txt);
$scope.bCSV = globalFuncs.getBlob("text/csv;charset=UTF-8",csv);
}
Expand Down
4 changes: 2 additions & 2 deletions app/scripts/controllers/viewWalletCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ var viewWalletCtrl = function($scope, walletService) {
$scope.wallet = walletService.wallet;
$scope.wd = true;
$scope.showEnc = walletService.password != '';
if (walletService.wallet.type == "default") $scope.blob = globalFuncs.getBlob("text/json;charset=UTF-8", $scope.wallet.toJSON());
if (walletService.wallet.type == "default") $scope.blob = globalFuncs.getBlob("application/json;charset=UTF-8", $scope.wallet.toJSON());
if (walletService.password != '') {
$scope.blobEnc = globalFuncs.getBlob("text/json;charset=UTF-8", $scope.wallet.toV3(walletService.password, {
$scope.blobEnc = globalFuncs.getBlob("application/json;charset=UTF-8", $scope.wallet.toV3(walletService.password, {
kdf: globalFuncs.kdf,
n: globalFuncs.scrypt.n
}));
Expand Down
4 changes: 2 additions & 2 deletions app/scripts/controllers/walletGenCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ var walletGenCtrl = function($scope) {
$scope.isDone = false;
$scope.wallet = Wallet.generate(false);
$scope.showWallet = true;
$scope.blob = globalFuncs.getBlob("text/json;charset=UTF-8", $scope.wallet.toJSON());
$scope.blobEnc = globalFuncs.getBlob("text/json;charset=UTF-8", $scope.wallet.toV3($scope.password, {
$scope.blob = globalFuncs.getBlob("application/json;charset=UTF-8", $scope.wallet.toJSON());
$scope.blobEnc = globalFuncs.getBlob("application/json;charset=UTF-8", $scope.wallet.toV3($scope.password, {
kdf: globalFuncs.kdf,
n: globalFuncs.scrypt.n
}));
Expand Down
4 changes: 2 additions & 2 deletions app/scripts/myetherwallet.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ Wallet.prototype.toV3 = function(password, opts) {
random: opts.uuid || ethUtil.crypto.randomBytes(16)
}),
address: this.getAddress().toString('hex'),
Crypto: {
crypto: {
ciphertext: ciphertext.toString('hex'),
cipherparams: {
iv: iv.toString('hex')
Expand Down Expand Up @@ -351,7 +351,7 @@ Wallet.prototype.toV3String = function(password, opts) {
}
Wallet.prototype.getV3Filename = function(timestamp) {
var ts = timestamp ? new Date(timestamp) : new Date()
return ['UTC--', ts.toJSON().replace(/:/g, '-'), '--', this.getAddress().toString('hex')].join('')
return ['UTC--', ts.toJSON().replace(/:/g, '-'), '--', this.getAddress().toString('hex'), '.json'].join('')
}
Wallet.decipherBuffer = function(decipher, data) {
return Buffer.concat([decipher.update(data), decipher.final()])
Expand Down