-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
weekend update - qrcode - icons - larger settings panel
- Loading branch information
1 parent
b7a6ea2
commit d32d3cf
Showing
21 changed files
with
2,493 additions
and
356 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
- v0.0.23 | ||
- Added icons for coins and tokens | ||
- New settings menu | ||
- View transactions from within the app (ETH) | ||
- UI bug fixes | ||
<h3>v0.0.23</h3> | ||
Major design changes and code structure refactoring. Export Wallet data (not private keys) for offline usage. | ||
- Added icons for coins and tokens<br> | ||
- New settings menu<br> | ||
- View transactions from within the app (ETH)<br> | ||
- UI bug fixes<br> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,158 @@ | ||
|
||
|
||
|
||
var eToken = { | ||
address: "", | ||
balance: 0, | ||
symbol: "", | ||
decimals: 8 | ||
}; | ||
|
||
|
||
var exporter = { | ||
info: "CoinApp.io", | ||
version: version, | ||
time: 0, | ||
address: "", | ||
balance: 0, | ||
decimals: 18, | ||
nonce: 0, | ||
coin: "", | ||
transactions: [], | ||
utxo: [], | ||
tokens: [] | ||
}; | ||
|
||
|
||
|
||
function ImportWalletData() { | ||
dialog.showOpenDialog(function(file) { | ||
fs.readFile(file.toString(), function (err, data) { | ||
var json = JSON.parse(data.toString()); | ||
console.log(json); | ||
}); | ||
}); | ||
} | ||
|
||
|
||
|
||
|
||
function ConvertImportedData(data) { | ||
|
||
|
||
|
||
} | ||
|
||
|
||
|
||
|
||
|
||
function ExportETHWallet() { | ||
ParseETHWalletData().then(function(data) { | ||
var json = WalletToJSON(data); | ||
dialog.showSaveDialog({defaultPath: configs.address.substring(0, 10)+'-data.json'},function (fileName) { | ||
var stream = fs.createWriteStream(fileName); | ||
stream.once('open', function(fd) { | ||
stream.write(json); | ||
stream.end(); | ||
}); | ||
}); | ||
}); | ||
} | ||
|
||
|
||
|
||
function ExportBTCWallet() { | ||
ParseBTCWalletData().then(function(data) { | ||
var json = WalletToJSON(data); | ||
dialog.showSaveDialog({defaultPath: configs.address.substring(0, 10)+'-data.json'},function (fileName) { | ||
var stream = fs.createWriteStream(fileName); | ||
stream.once('open', function(fd) { | ||
stream.write(json); | ||
stream.end(); | ||
}); | ||
}); | ||
}); | ||
} | ||
|
||
|
||
|
||
function ExportWallet() { | ||
if (isBitcoin()) { | ||
ExportBTCWallet() | ||
} else { | ||
ExportETHWallet() | ||
} | ||
} | ||
|
||
|
||
|
||
function ParseBTCWalletData() { | ||
return new Promise(function(resolve, reject) { | ||
if (isBitcoin()) { | ||
|
||
UpdateBalance().then(function(balance) { | ||
DownloadAllBitcoinTransactions(configs.address).then(function(transactions) { | ||
LoadUTXOs(configs.address).then(function(utxos) { | ||
|
||
exporter = { | ||
info: "CoinApp.io Wallet Data for "+configs.address, | ||
version: version, | ||
address: configs.address, | ||
balance: balance.toString(), | ||
decimals: 8, | ||
coin: configs.coin, | ||
transactions: transactions.transactions, | ||
utxos: utxos | ||
}; | ||
|
||
resolve(exporter); | ||
|
||
|
||
}); | ||
}); | ||
}); | ||
|
||
} | ||
|
||
}); | ||
} | ||
|
||
|
||
|
||
|
||
|
||
function ParseETHWalletData() { | ||
return new Promise(function(resolve, reject) { | ||
if (configs.coin=="ETH" || configs.coin=="ROPSTEN") { | ||
|
||
GetNonce().then(function(nonce) { | ||
|
||
exporter = { | ||
info: "CoinApp.io Wallet Data for "+configs.address, | ||
version: version, | ||
address: configs.address, | ||
balance: configs.bigBalance.toString(), | ||
decimals: 18, | ||
coin: configs.coin, | ||
nonce: nonce, | ||
transactions: configs.transactions, | ||
tokens: configs.availableTokens | ||
}; | ||
|
||
resolve(exporter); | ||
|
||
}); | ||
|
||
} | ||
|
||
}); | ||
} | ||
|
||
|
||
|
||
function WalletToJSON(expo) { | ||
var ex = expo; | ||
ex.time = Math.round(+new Date()/1000); | ||
return JSON.stringify(ex); | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.