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

Commit

Permalink
Add Show Private Key button
Browse files Browse the repository at this point in the history
  • Loading branch information
valamidev committed Nov 8, 2021
1 parent c601417 commit 0f3748d
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
20 changes: 19 additions & 1 deletion assets/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,11 @@ <h5 class="modal-title" id="settingModalLabel">Settings</h5>
<button class="nav-link" id="coinmarketcap-tab" data-bs-toggle="tab" data-bs-target="#coinmarketcap" type="button"
role="tab" aria-controls="coinmarketcap" aria-selected="false">CoinMarketCap</button>
</li>

<li class="nav-item" role="presentation">
<button class="nav-link" id="exportkey-tab" data-bs-toggle="tab" data-bs-target="#exportkey" type="button"
role="tab" aria-controls="exportkey" aria-selected="false">Export Private Key</button>
</li>
</ul>

<div class="tab-content" id="settingTabContent">
Expand Down Expand Up @@ -205,7 +210,7 @@ <h5 class="modal-title" id="settingModalLabel">Settings</h5>
</div>
<div class="mb-3">
<label for="settingTelegramFilter" class="form-label">CustomFilterWord</label>
<input type="text" placeholder="BNB" class="form-control" id="settingTelegramFilter">
<input type="text" placeholder="Optional word which signal should include e.g. BNB" class="form-control" id="settingTelegramFilter">
</div>
<div class="mb-3">
<label for="settingTelegramAPI" class="form-label">TelegramAPI ID</label>
Expand All @@ -228,6 +233,19 @@ <h5 class="modal-title" id="settingModalLabel">Settings</h5>
</div>

</div>


<div style="padding-top: 2rem;" class="tab-pane fade" id="exportkey" role="tabpanel"
aria-labelledby="exportkey-tab">

<div class="mb-3">
<input type="button" class="btn btn-danger" value='Show PrivateKey' id="loadKeyPrivateKey" >
<p></p>
<input type="text" class="form-control" id="privateKeyReadable">
</div>

</div>

</div>


Expand Down
9 changes: 9 additions & 0 deletions assets/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,11 @@ window.onload = (event) => {

});

document.getElementById('loadKeyPrivateKey').addEventListener('click', () => {
if (store.has('privateKey')) {
document.getElementById('privateKeyReadable').value = store.get('privateKey');
}
});



Expand Down Expand Up @@ -144,6 +149,10 @@ const syncSetting = () => {
ipcRenderer.send('setting:async', readSetting());
};





const readSetting = () => {
const privateKey = document.getElementById('setting1').value;
const chain = document.getElementById('setting2').value;
Expand Down

0 comments on commit 0f3748d

Please sign in to comment.