Skip to content

Commit

Permalink
Bug fixed when exporting backup using non latin characters in label
Browse files Browse the repository at this point in the history
  • Loading branch information
Josema committed Nov 22, 2018
1 parent c90a370 commit a248ea3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "coinfy",
"version": "1.5.13",
"version": "1.5.14",
"repository": "https://github.com/elevenyellow/coinfy",
"scripts": {
"stats": "webpack --config=./webpack/production.js --profile --json > webpack-stats.json | open https://chrisbateman.github.io/webpack-visualizer/",
Expand Down
2 changes: 1 addition & 1 deletion public/static/bundle/main.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/store/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ export function exportBackup(a_element) {
)
// console.log('exportBackup', data)
downloadFile({
data: btoa(JSON.stringify(data)),
data: btoa(unescape(encodeURIComponent(JSON.stringify(data)))),
a: a_element,
name: 'YOU_MUST_RENAME_THIS_FOR_SECURITY'
})
Expand Down Expand Up @@ -196,7 +196,7 @@ export function openImportAssetsFromFile() {

export function importBackup(dataString) {
try {
let data = JSON.parse(atob(dataString))
let data = JSON.parse(decodeURIComponent(escape(atob(dataString))))

// cheking if the file imported is an old version
if (data.v === undefined || data.network === undefined)
Expand Down

0 comments on commit a248ea3

Please sign in to comment.