+ transaction details with explorer redirection
+ sorting and floating header for wallets and address book + detect geth crash and notify the user
This commit is contained in:
@@ -134,6 +134,15 @@ body.pg-loaded > .inner {
|
||||
height: 300px;
|
||||
}
|
||||
|
||||
#dlgTransactionInfo {
|
||||
width: 700px;
|
||||
max-width: 700px !important;
|
||||
}
|
||||
|
||||
#dlgTransactionInfo .modalBody {
|
||||
height: 300px;
|
||||
}
|
||||
|
||||
#dlgAddAddressToBook .modalBody,
|
||||
#dlgChangeWalletName .modalBody,
|
||||
#dlgChangeAddressName .modalBody,
|
||||
@@ -231,6 +240,7 @@ div.sidebar svg {
|
||||
|
||||
.dataTables_scrollBody .transactionsBlockNum {
|
||||
color: #f92472;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.sendWrapper,
|
||||
@@ -268,7 +278,18 @@ div.sidebar svg {
|
||||
|
||||
.sendTXInfo label {
|
||||
line-height: 30px;
|
||||
font-size: 1.2em;
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
.txInfo label {
|
||||
line-height: 30px;
|
||||
margin-left: 5px;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
.txInfo label + label {
|
||||
color: #7A1336;
|
||||
margin-left: 0px;
|
||||
}
|
||||
|
||||
.sendTXdivider {
|
||||
@@ -403,4 +424,4 @@ div.noAddressWrapper {
|
||||
|
||||
#chartMarketPrice {
|
||||
height: calc(100vh - 260px);
|
||||
}
|
||||
}
|
||||
@@ -8,7 +8,7 @@ th[role=columnheader]:not(.no-sort):after {
|
||||
margin-top: 7px;
|
||||
border-width: 0 8px 8px;
|
||||
border-style: solid;
|
||||
border-color: #7A1336 transparent;
|
||||
border-color: #ccc transparent;
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
-ms-user-select: none;
|
||||
|
||||
@@ -1,67 +1,74 @@
|
||||
<div id="walletsToolbar">
|
||||
<button type="button" class="btn btn-etho" id="btnNewAddress"><i class="fas fa-plus"></i></button>
|
||||
<button type="button" class="btn btn-etho" id="btnNewAddress">
|
||||
<i class="fas fa-plus"></i>
|
||||
</button>
|
||||
</div>
|
||||
<div id="addressList" class="{{#if addressData.length}}addressWrapper{{else}}noAddressWrapper{{/if}}">
|
||||
{{#if addressData.length}}
|
||||
<table class="bordered" id="addressTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col"></th>
|
||||
<th scope="col">Name</th>
|
||||
<th scope="col">Address</th>
|
||||
<th scope="col">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#addressData}}
|
||||
<tr>
|
||||
<th scope="row" class="colEdit"><button type="button" class="btn btn-etho btnChangAddressName" data-address="{{address}}" data-name="{{name}}">Edit</button></th>
|
||||
<td>{{name}}</td>
|
||||
<td><span class="textAddress">{{address}}</span></td>
|
||||
<td><button type="button" class="btn btn-etho btnDeleteAddress" data-address="{{address}}"><i class="far fa-trash-alt"></i></button></td>
|
||||
</tr>
|
||||
{{/addressData}}
|
||||
</tbody>
|
||||
</table>
|
||||
{{else}}
|
||||
<div id="noAddressPresent">You don't have any addresses, create a new one</div>
|
||||
{{/if}}
|
||||
{{#if addressData.length}}
|
||||
<table class="bordered" id="addressTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" data-sort-method='none'></th>
|
||||
<th scope="col">Name</th>
|
||||
<th scope="col">Address</th>
|
||||
<th scope="col" data-sort-method='none'>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#addressData}}
|
||||
<tr>
|
||||
<th scope="row" class="colEdit">
|
||||
<button type="button" class="btn btn-etho btnChangAddressName" data-address="{{address}}" data-name="{{name}}">Edit</button>
|
||||
</th>
|
||||
<td>{{name}}</td>
|
||||
<td>
|
||||
<span class="textAddress">{{address}}</span></td>
|
||||
<td>
|
||||
<button type="button" class="btn btn-etho btnDeleteAddress" data-address="{{address}}">
|
||||
<i class="far fa-trash-alt"></i>
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
{{/addressData}}
|
||||
</tbody>
|
||||
</table>
|
||||
{{else}}
|
||||
<div id="noAddressPresent">You don't have any addresses, create a new one</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
<div id="dlgCreateAddressAndName" class="modalDialog" data-iziModal-title="Create new address" data-iziModal-subtitle="Enter the name and the address" data-iziModal-icon="icon-home">
|
||||
<div class="modalBody">
|
||||
<div class="form-group">
|
||||
<label for="addressName">Address Name:</label>
|
||||
<input type="text" class="form-control" id="addressName">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="addressHash">Address Hash:</label>
|
||||
<input type="text" class="form-control" id="addressHash">
|
||||
</div>
|
||||
<button type="button" class="btn btn-etho btn-dialog-confirm" id="btnCreateAddressConfirm">Confirm</button>
|
||||
|
||||
<div id="dlgCreateAddressAndName" class="modalDialog" data-izimodal-title="Create new address" data-izimodal-subtitle="Enter the name and the address" data-izimodal-icon="icon-home">
|
||||
<div class="modalBody">
|
||||
<div class="form-group">
|
||||
<label for="addressName">Address Name:</label>
|
||||
<input type="text" class="form-control" id="addressName">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="addressHash">Address Hash:</label>
|
||||
<input type="text" class="form-control" id="addressHash">
|
||||
</div>
|
||||
<button type="button" class="btn btn-etho btn-dialog-confirm" id="btnCreateAddressConfirm">Confirm</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- The modal to change address name -->
|
||||
<div id="dlgChangeAddressName" class="modalDialog" data-iziModal-title="Address Name" data-iziModal-subtitle="Enter the name for this address" data-iziModal-icon="icon-home">
|
||||
<div class="modalBody">
|
||||
<div class="form-group">
|
||||
<label for="usr">Type Name:</label>
|
||||
<input type="text" class="form-control" id="inputAddressName">
|
||||
</div>
|
||||
<button type="button" class="btn btn-etho btn-dialog-confirm" id="btnChangeAddressNameConfirm">Confirm</button>
|
||||
<div id="dlgChangeAddressName" class="modalDialog" data-izimodal-title="Address Name" data-izimodal-subtitle="Enter the name for this address" data-izimodal-icon="icon-home">
|
||||
<div class="modalBody">
|
||||
<div class="form-group">
|
||||
<label for="usr">Type Name:</label>
|
||||
<input type="text" class="form-control" id="inputAddressName">
|
||||
</div>
|
||||
<button type="button" class="btn btn-etho btn-dialog-confirm" id="btnChangeAddressNameConfirm">Confirm</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- The modal for delete confirmation -->
|
||||
<div id="dlgDeleteAddressConfirm" class="modalDialog" data-iziModal-title="Application Error" data-iziModal-subtitle="Something went wrong, don't kill the fish..." data-iziModal-icon="icon-home">
|
||||
<div class="modalBody">
|
||||
<div class="form-group">
|
||||
<span>Do you really want to delete the address?</span>
|
||||
</div>
|
||||
<button type="button" class="btn btn-etho btn-dialog-cancel" id="btnDeleteAddressCancel">No</button>
|
||||
<button type="button" class="btn btn-etho btn-dialog-confirm" id="btnDeleteAddressConfirm">Yes</button>
|
||||
<div id="dlgDeleteAddressConfirm" class="modalDialog" data-izimodal-title="Application Error" data-izimodal-subtitle="Something went wrong, don't kill the fish..." data-izimodal-icon="icon-home">
|
||||
<div class="modalBody">
|
||||
<div class="form-group">
|
||||
<span>Do you really want to delete the address?</span>
|
||||
</div>
|
||||
<button type="button" class="btn btn-etho btn-dialog-cancel" id="btnDeleteAddressCancel">No</button>
|
||||
<button type="button" class="btn btn-etho btn-dialog-confirm" id="btnDeleteAddressConfirm">Yes</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,110 +1,120 @@
|
||||
<div class="sendWrapper">
|
||||
<div class="card-panel">
|
||||
<form class="col s12">
|
||||
<div class="row">
|
||||
<div class="input-field col s6">
|
||||
<select id="sendFromAddress">
|
||||
<option value="" disabled selected>Choose your address</option>
|
||||
{{#addressData}}
|
||||
<option value="{{address}}">{{name}} - {{address}}</option>
|
||||
{{/addressData}}
|
||||
</select>
|
||||
<label for="sendFromAddress">From address:</label>
|
||||
<small id="sendFromAddressName" class="form-text text-muted"></small>
|
||||
</div>
|
||||
<div class="input-field col s6">
|
||||
<label for="sendToAddress" class="active">To address:</label>
|
||||
<div class="addressInputWrapper">
|
||||
<input id="sendToAddress" placeholder="recipient address" type="text">
|
||||
<button type="button" class="btn btn-etho btnSendToolButton" id="btnAddToAddressBook"><i class="fas fa-plus"></i></button>
|
||||
<button type="button" class="btn btn-etho btnSendToolButton" id="btnLookForToAddress"><i class="fas fa-search"></i></button>
|
||||
</div>
|
||||
<small id="sendToAddressName" class="form-text text-muted"></small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="input-field col s6">
|
||||
<input id="sendAmmount" placeholder="0" type="number" value="0">
|
||||
<label for="sendAmmount" class="active">Amount:</label>
|
||||
</div>
|
||||
<div class="input-field col s6">
|
||||
<div class="input-field col s12">
|
||||
<span id="sendMaxAmmount">0</span><span>ETHO</span>
|
||||
<button type="button" class="btn btn-etho" id="btnSendAll">ALL</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="input-field col s12">
|
||||
<button type="button" class="btn btn-etho" id="btnSendTransaction">Send</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div id="cardTransactionsForAddress" class="card-panel" style="display: none;">
|
||||
<table id="tableTransactionsForAddress" class="display" style="width:100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Block</th>
|
||||
<th>Timestamp</th>
|
||||
<th>To</th>
|
||||
<th>Value</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th>Block</th>
|
||||
<th>Timestamp</th>
|
||||
<th>To</th>
|
||||
<th>Value</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
<div class="card-panel">
|
||||
<form class="col s12">
|
||||
<div class="row">
|
||||
<div class="input-field col s6">
|
||||
<select id="sendFromAddress">
|
||||
<option value="" disabled="disabled" selected="selected">Choose your address</option>
|
||||
{{#addressData}}
|
||||
<option value="{{address}}">{{name}}
|
||||
-
|
||||
{{address}}</option>
|
||||
{{/addressData}}
|
||||
</select>
|
||||
<label for="sendFromAddress">From address:</label>
|
||||
<small id="sendFromAddressName" class="form-text text-muted"></small>
|
||||
</div>
|
||||
<div class="input-field col s6">
|
||||
<label for="sendToAddress" class="active">To address:</label>
|
||||
<div class="addressInputWrapper">
|
||||
<input id="sendToAddress" placeholder="recipient address" type="text">
|
||||
<button type="button" class="btn btn-etho btnSendToolButton" id="btnAddToAddressBook">
|
||||
<i class="fas fa-plus"></i>
|
||||
</button>
|
||||
<button type="button" class="btn btn-etho btnSendToolButton" id="btnLookForToAddress">
|
||||
<i class="fas fa-search"></i>
|
||||
</button>
|
||||
</div>
|
||||
<small id="sendToAddressName" class="form-text text-muted"></small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="input-field col s6">
|
||||
<input id="sendAmmount" placeholder="0" type="number" value="0">
|
||||
<label for="sendAmmount" class="active">Amount:</label>
|
||||
</div>
|
||||
<div class="input-field col s6">
|
||||
<div class="input-field col s12">
|
||||
<span id="sendMaxAmmount">0</span><span>ETHO</span>
|
||||
<button type="button" class="btn btn-etho" id="btnSendAll">ALL</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="input-field col s12">
|
||||
<button type="button" class="btn btn-etho" id="btnSendTransaction">Send</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div id="cardTransactionsForAddress" class="card-panel" style="display: none;">
|
||||
<table id="tableTransactionsForAddress" class="display" style="width:100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Block</th>
|
||||
<th>Timestamp</th>
|
||||
<th>To</th>
|
||||
<th>Value</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th>Block</th>
|
||||
<th>Timestamp</th>
|
||||
<th>To</th>
|
||||
<th>Value</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- The modal for wallet password -->
|
||||
<div id="dlgSendWalletPassword" class="modalDialog" data-iziModal-title="Wallet Password" data-iziModal-subtitle="To send from this wallet, please enter the wallet password" data-iziModal-icon="icon-home">
|
||||
<div class="modalBody">
|
||||
<div class="form-group sendTXInfo">
|
||||
<i class="fas fa-wallet"></i>
|
||||
<label>From address:</label><label id="fromAddressInfo"></label>
|
||||
</div>
|
||||
<div class="form-group sendTXInfo">
|
||||
<i class="fas fa-wallet"></i>
|
||||
<label>To address:</label><label id="toAddressInfo"></label>
|
||||
</div>
|
||||
<div class="form-group sendTXInfo">
|
||||
<i class="fas fa-dollar-sign"></i>
|
||||
<label>Value to send:</label><label id="valueToSendInfo"></label><label class="currencyTicker">ETHO</label>
|
||||
</div>
|
||||
<div class="form-group sendTXInfo">
|
||||
<i class="fas fa-dollar-sign"></i>
|
||||
<label>Fee to pay:</label><label id="feeToPayInfo"></label><label class="currencyTicker">ETHO</label>
|
||||
</div>
|
||||
<hr class="sendTXdivider">
|
||||
<div class="form-group sendTXPass">
|
||||
<label for="usr">Type Password:</label>
|
||||
<input type="password" class="form-control" id="walletPassword">
|
||||
</div>
|
||||
<button type="button" class="btn btn-etho btn-dialog-confirm" id="btnSendWalletPasswordConfirm">Confirm</button>
|
||||
<!-- send details dialog -->
|
||||
<div id="dlgSendWalletPassword" class="modalDialog" data-izimodal-title="Wallet Password" data-izimodal-subtitle="To send from this wallet, please enter the wallet password" data-izimodal-icon="icon-home">
|
||||
<div class="modalBody">
|
||||
<div class="form-group sendTXInfo">
|
||||
<i class="fas fa-wallet"></i>
|
||||
<label>From address:</label>
|
||||
<label id="fromAddressInfo"></label>
|
||||
</div>
|
||||
<div class="form-group sendTXInfo">
|
||||
<i class="fas fa-wallet"></i>
|
||||
<label>To address:</label>
|
||||
<label id="toAddressInfo"></label>
|
||||
</div>
|
||||
<div class="form-group sendTXInfo">
|
||||
<i class="fas fa-dollar-sign"></i>
|
||||
<label>Value to send:</label>
|
||||
<label id="valueToSendInfo"></label>
|
||||
<label class="currencyTicker">ETHO</label>
|
||||
</div>
|
||||
<div class="form-group sendTXInfo">
|
||||
<i class="fas fa-dollar-sign"></i>
|
||||
<label>Fee to pay:</label>
|
||||
<label id="feeToPayInfo"></label>
|
||||
<label class="currencyTicker">ETHO</label>
|
||||
</div>
|
||||
<hr class="sendTXdivider">
|
||||
<div class="form-group sendTXPass">
|
||||
<label for="usr">Type Password:</label>
|
||||
<input type="password" class="form-control" id="walletPassword">
|
||||
</div>
|
||||
<button type="button" class="btn btn-etho btn-dialog-confirm" id="btnSendWalletPasswordConfirm">Confirm</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- The modal for address list -->
|
||||
<div id="dlgAddressList" class="modalDialog" data-iziModal-title="AddressList" data-iziModal-subtitle="Please select an address from the list" data-iziModal-icon="icon-home">
|
||||
<div class="modalBody" id="dlgAddressListBody">
|
||||
</div>
|
||||
<div id="dlgAddressList" class="modalDialog" data-izimodal-title="AddressList" data-izimodal-subtitle="Please select an address from the list" data-izimodal-icon="icon-home">
|
||||
<div class="modalBody" id="dlgAddressListBody"></div>
|
||||
</div>
|
||||
|
||||
<!-- The modal to add address to address book -->
|
||||
<div id="dlgAddAddressToBook" class="modalDialog" data-iziModal-title="Address Name" data-iziModal-subtitle="Enter the name for this address" data-iziModal-icon="icon-home">
|
||||
<div class="modalBody">
|
||||
<div class="form-group">
|
||||
<label for="usr">Address Name:</label>
|
||||
<input type="text" class="form-control" id="inputAddressName">
|
||||
</div>
|
||||
<button type="button" class="btn btn-etho btn-dialog-confirm" id="btnAddAddressToBookConfirm">Confirm</button>
|
||||
<div id="dlgAddAddressToBook" class="modalDialog" data-izimodal-title="Address Name" data-izimodal-subtitle="Enter the name for this address" data-izimodal-icon="icon-home">
|
||||
<div class="modalBody">
|
||||
<div class="form-group">
|
||||
<label for="usr">Address Name:</label>
|
||||
<input type="text" class="form-control" id="inputAddressName">
|
||||
</div>
|
||||
<button type="button" class="btn btn-etho btn-dialog-confirm" id="btnAddAddressToBookConfirm">Confirm</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,38 +1,77 @@
|
||||
<div id="transactionsWrapper">
|
||||
<!----<button type="button" class="btn btn-etho" id="btnRefreshTransactions">Refresh</button>-->
|
||||
<table id="tableTransactionsForAll" class="display tableTransactions" style="width:100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Block</th>
|
||||
<th>Timestamp</th>
|
||||
<th>From</th>
|
||||
<th>To</th>
|
||||
<th>Value</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Block</th>
|
||||
<th>Timestamp</th>
|
||||
<th>From</th>
|
||||
<th>To</th>
|
||||
<th>Value</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<!----<button type="button" class="btn btn-etho" id="btnRefreshTransactions">Refresh</button>-->
|
||||
<table id="tableTransactionsForAll" class="display tableTransactions" style="width:100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Block</th>
|
||||
<th>Timestamp</th>
|
||||
<th>TxHash</th>
|
||||
<th>From</th>
|
||||
<th>To</th>
|
||||
<th>Value</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Block</th>
|
||||
<th>Timestamp</th>
|
||||
<th>From</th>
|
||||
<th>TxHash</th>
|
||||
<th>To</th>
|
||||
<th>Value</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- transaction details dialog -->
|
||||
<div id="dlgTransactionInfo" class="modalDialog" data-izimodal-title="Transaction Info" data-izimodal-subtitle="Detailed info about the selected transaction" data-izimodal-icon="icon-home">
|
||||
<div class="modalBody">
|
||||
<div class="form-group txInfo">
|
||||
<i class="fas fa-wallet"></i>
|
||||
<label>Block height:</label>
|
||||
<label id="txBlockHeight"></label>
|
||||
</div>
|
||||
<div class="form-group txInfo">
|
||||
<i class="fas fa-wallet"></i>
|
||||
<label>TX Timestamp:</label>
|
||||
<label id="txTimestamp"></label>
|
||||
</div>
|
||||
<div class="form-group txInfo">
|
||||
<i class="fas fa-wallet"></i>
|
||||
<label>TX hash:</label>
|
||||
<a id="txHash"></a>
|
||||
</div>
|
||||
<div class="form-group txInfo">
|
||||
<i class="fas fa-wallet"></i>
|
||||
<label>From address:</label>
|
||||
<a id="txFromAddress"></a>
|
||||
</div>
|
||||
<div class="form-group txInfo">
|
||||
<i class="fas fa-wallet"></i>
|
||||
<label>To address:</label>
|
||||
<a id="txToAddress"></a>
|
||||
</div>
|
||||
<div class="form-group txInfo">
|
||||
<i class="fas fa-dollar-sign"></i>
|
||||
<label>Value:</label>
|
||||
<label id="txValue"></label>
|
||||
<label class="currencyTicker">ETHO</label>
|
||||
</div>
|
||||
<button type="button" class="btn btn-etho btn-dialog-confirm" id="btnTxInfoClose">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="loadingOverlay" id="loadingTransactionsOverlay">
|
||||
<div class="loadingWrapper">
|
||||
<div class="loadingTextTransactions">Transaction are loading, please wait...</div>
|
||||
<div class='spinner'>
|
||||
<div class='bounce bounce1'></div>
|
||||
<div class='bounce bounce2'></div>
|
||||
<div class='bounce bounce3'></div>
|
||||
</div>
|
||||
<div>
|
||||
</div>
|
||||
<div class="loadingWrapper">
|
||||
<div class="loadingTextTransactions">Transaction are loading, please wait...</div>
|
||||
<div class='spinner'>
|
||||
<div class='bounce bounce1'></div>
|
||||
<div class='bounce bounce2'></div>
|
||||
<div class='bounce bounce3'></div>
|
||||
</div>
|
||||
<div></div>
|
||||
|
||||
@@ -58,6 +58,7 @@ ipcMain.on("getTransactions", (event, arg) => {
|
||||
ResultData.push([
|
||||
docs[i].block,
|
||||
docs[i].timestamp,
|
||||
docs[i].txhash,
|
||||
docs[i].fromaddr,
|
||||
docs[i].toaddr,
|
||||
docs[i].value
|
||||
|
||||
@@ -7,8 +7,9 @@ const os = require("os");
|
||||
|
||||
class Geth {
|
||||
constructor() {
|
||||
this.isRunning = false;
|
||||
this.gethProcess = null;
|
||||
this.logGethEvents = false;
|
||||
this.logGethEvents = true;
|
||||
// create the user data dir (needed for MacOS)
|
||||
if (!fs.existsSync(app.getPath("userData"))) {
|
||||
fs.mkdirSync(app.getPath("userData"));
|
||||
@@ -48,6 +49,7 @@ class Geth {
|
||||
startGeth() {
|
||||
// get the path of get and execute the child process
|
||||
try {
|
||||
this.isRunning = true;
|
||||
const gethPath = path.join(this.binaries, "geth");
|
||||
this.gethProcess = child_process.spawn(gethPath, [
|
||||
"--ws",
|
||||
@@ -69,6 +71,12 @@ class Geth {
|
||||
dialog.showErrorBox("Error starting application", "Geth failed to start!");
|
||||
app.quit();
|
||||
});
|
||||
this.gethProcess.on("close", function (err) {
|
||||
if (this.isRunning) {
|
||||
dialog.showErrorBox("Error running the node", "The node stoped working. Wallet will close!");
|
||||
app.quit();
|
||||
}
|
||||
});
|
||||
this.gethProcess.stderr.on("data", function (data) {
|
||||
EthoGeth._writeLog(data.toString() + "\n");
|
||||
});
|
||||
@@ -83,6 +91,8 @@ class Geth {
|
||||
}
|
||||
|
||||
stopGeth() {
|
||||
this.isRunning = false;
|
||||
|
||||
if (os.type() == "Windows_NT") {
|
||||
const gethWrapePath = path.join(this.binaries, "WrapGeth.exe");
|
||||
child_process.spawnSync(gethWrapePath, [this.gethProcess.pid]);
|
||||
|
||||
@@ -162,7 +162,7 @@ if (process.platform === "darwin") {
|
||||
}
|
||||
|
||||
ipcMain.on("openURL", (event, arg) => {
|
||||
shell.openExternal("https://github.com/taeguscromis/Ether1DesktopWallet/issues");
|
||||
shell.openExternal(arg);
|
||||
});
|
||||
|
||||
const menu = Menu.buildFromTemplate(template);
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
const {ipcRenderer} = require('electron');
|
||||
const {ipcRenderer} = require("electron");
|
||||
|
||||
class AddressBook {
|
||||
constructor() {
|
||||
}
|
||||
|
||||
constructor() {}
|
||||
|
||||
setAddressName(address, name) {
|
||||
var addressBook = EthoDatatabse.getAddresses();
|
||||
|
||||
@@ -29,12 +28,13 @@ class AddressBook {
|
||||
EthoDatatabse.setAddresses(addressBook);
|
||||
}
|
||||
|
||||
enableButtonTooltips() {
|
||||
}
|
||||
|
||||
enableButtonTooltips() {}
|
||||
|
||||
renderAddressBook() {
|
||||
var addressObject = EthoAddressBook.getAddressList();
|
||||
var renderData = { addressData: [] };
|
||||
var renderData = {
|
||||
addressData: []
|
||||
};
|
||||
|
||||
for (var key in addressObject) {
|
||||
if (addressObject.hasOwnProperty(key)) {
|
||||
@@ -46,102 +46,94 @@ class AddressBook {
|
||||
}
|
||||
|
||||
// render the wallets current state
|
||||
EthoMainGUI.renderTemplate("addressBook.html", renderData);
|
||||
EthoMainGUI.renderTemplate("addressBook.html", renderData);
|
||||
$(document).trigger("render_addressBook");
|
||||
EthoAddressBook.enableButtonTooltips();
|
||||
}
|
||||
}
|
||||
|
||||
// the event to tell us that the wallets are rendered
|
||||
$(document).on("render_addressBook", function() {
|
||||
$("#btnNewAddress").off('click').on('click', function() {
|
||||
$(document).on("render_addressBook", function () {
|
||||
new Tablesort(document.getElementById("addressTable"));
|
||||
$("#addressTable").floatThead();
|
||||
|
||||
$("#btnNewAddress").off("click").on("click", function () {
|
||||
$("#dlgCreateAddressAndName").iziModal();
|
||||
$("#addressName").val("");
|
||||
$("#addressHash").val("");
|
||||
$('#dlgCreateAddressAndName').iziModal('open');
|
||||
$("#dlgCreateAddressAndName").iziModal("open");
|
||||
|
||||
function doCreateNewWallet() {
|
||||
$('#dlgCreateAddressAndName').iziModal('close');
|
||||
$("#dlgCreateAddressAndName").iziModal("close");
|
||||
|
||||
if (!EthoBlockchain.isAddress($("#addressHash").val())) {
|
||||
EthoMainGUI.showGeneralError("Address must be a valid address!");
|
||||
EthoMainGUI.showGeneralError("Address must be a valid address!");
|
||||
} else {
|
||||
EthoAddressBook.setAddressName($("#addressHash").val(), $("#addressName").val());
|
||||
EthoAddressBook.renderAddressBook();
|
||||
|
||||
iziToast.success({
|
||||
title: 'Created',
|
||||
message: 'New address was successfully created',
|
||||
position: 'topRight',
|
||||
timeout: 5000
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
$("#btnCreateAddressConfirm").off('click').on('click', function() {
|
||||
iziToast.success({title: "Created", message: "New address was successfully created", position: "topRight", timeout: 5000});
|
||||
}
|
||||
}
|
||||
|
||||
$("#btnCreateAddressConfirm").off("click").on("click", function () {
|
||||
doCreateNewWallet();
|
||||
});
|
||||
|
||||
$("#dlgCreateAddressAndName").off('keypress').on('keypress', function(e) {
|
||||
if(e.which == 13) {
|
||||
$("#dlgCreateAddressAndName").off("keypress").on("keypress", function (e) {
|
||||
if (e.which == 13) {
|
||||
doCreateNewWallet();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(".btnChangAddressName").off('click').on('click', function() {
|
||||
var walletAddress = $(this).attr('data-address');
|
||||
var walletName = $(this).attr('data-name');
|
||||
});
|
||||
});
|
||||
|
||||
$(".btnChangAddressName").off("click").on("click", function () {
|
||||
var walletAddress = $(this).attr("data-address");
|
||||
var walletName = $(this).attr("data-name");
|
||||
|
||||
$("#dlgChangeAddressName").iziModal();
|
||||
$("#inputAddressName").val(walletName);
|
||||
$('#dlgChangeAddressName').iziModal('open');
|
||||
$("#dlgChangeAddressName").iziModal("open");
|
||||
|
||||
function doChangeAddressName() {
|
||||
EthoAddressBook.setAddressName(walletAddress, $("#inputAddressName").val());
|
||||
$('#dlgChangeAddressName').iziModal('close');
|
||||
$("#dlgChangeAddressName").iziModal("close");
|
||||
EthoAddressBook.renderAddressBook();
|
||||
}
|
||||
|
||||
$("#btnChangeAddressNameConfirm").off('click').on('click', function() {
|
||||
$("#btnChangeAddressNameConfirm").off("click").on("click", function () {
|
||||
doChangeAddressName();
|
||||
});
|
||||
|
||||
$("#dlgChangeAddressName").off('keypress').on('keypress', function(e) {
|
||||
if(e.which == 13) {
|
||||
$("#dlgChangeAddressName").off("keypress").on("keypress", function (e) {
|
||||
if (e.which == 13) {
|
||||
doChangeAddressName();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(".btnDeleteAddress").off('click').on('click', function() {
|
||||
var deleteAddress = $(this).attr('data-address');
|
||||
});
|
||||
});
|
||||
|
||||
$(".btnDeleteAddress").off("click").on("click", function () {
|
||||
var deleteAddress = $(this).attr("data-address");
|
||||
|
||||
$("#dlgDeleteAddressConfirm").iziModal();
|
||||
$('#dlgDeleteAddressConfirm').iziModal('open');
|
||||
|
||||
$("#btnDeleteAddressCancel").off('click').on('click', function() {
|
||||
$('#dlgDeleteAddressConfirm').iziModal('close');
|
||||
$("#dlgDeleteAddressConfirm").iziModal("open");
|
||||
|
||||
$("#btnDeleteAddressCancel").off("click").on("click", function () {
|
||||
$("#dlgDeleteAddressConfirm").iziModal("close");
|
||||
});
|
||||
|
||||
$("#btnDeleteAddressConfirm").off('click').on('click', function() {
|
||||
$('#dlgDeleteAddressConfirm').iziModal('close');
|
||||
$("#btnDeleteAddressConfirm").off("click").on("click", function () {
|
||||
$("#dlgDeleteAddressConfirm").iziModal("close");
|
||||
EthoAddressBook.deleteAddress(deleteAddress);
|
||||
EthoAddressBook.renderAddressBook();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
$(".textAddress").off('click').on('click', function() {
|
||||
$(".textAddress").off("click").on("click", function () {
|
||||
EthoMainGUI.copyToClipboard($(this).html());
|
||||
|
||||
iziToast.success({
|
||||
title: 'Copied',
|
||||
message: 'Address was copied to clipboard',
|
||||
position: 'topRight',
|
||||
timeout: 2000
|
||||
});
|
||||
iziToast.success({title: "Copied", message: "Address was copied to clipboard", position: "topRight", timeout: 2000});
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
EthoAddressBook = new AddressBook();
|
||||
@@ -1,3 +1,5 @@
|
||||
const {ipcRenderer} = require("electron");
|
||||
|
||||
class tableTransactions {
|
||||
constructor() {
|
||||
this.appState = "account";
|
||||
@@ -57,12 +59,15 @@ class tableTransactions {
|
||||
return moment(data, "YYYY-MM-DD HH:mm:ss").format("MMM Do YYYY HH:mm:ss");
|
||||
}
|
||||
}, {
|
||||
targets: 5,
|
||||
targets: 3,
|
||||
visible: false
|
||||
}, {
|
||||
targets: 6,
|
||||
render: function (data, type, row) {
|
||||
return parseFloat(web3Local.utils.fromWei(EthoUtils.toFixed(parseFloat(data)).toString(), "ether")).toFixed(2);
|
||||
}
|
||||
}, {
|
||||
targets: 6,
|
||||
targets: 7,
|
||||
defaultContent: "",
|
||||
render: function (data, type, row) {
|
||||
if (row[1]) {
|
||||
@@ -77,6 +82,36 @@ class tableTransactions {
|
||||
$("#loadingTransactionsOverlay").css("display", "none");
|
||||
}
|
||||
});
|
||||
|
||||
$(id + " tbody").off("click").on("click", "td", function () {
|
||||
if ($(id).DataTable().cell(this).index().column == 1) {
|
||||
var rowIdx = $(id).DataTable().cell(this).index().row;
|
||||
var rowData = $(id).DataTable().rows(rowIdx).data()[0];
|
||||
|
||||
console.log(rowData[6]);
|
||||
$("#dlgTransactionInfo").iziModal();
|
||||
$("#txBlockHeight").html(rowData[1]);
|
||||
$("#txTimestamp").html(rowData[2]);
|
||||
$("#txHash").html(rowData[3]);
|
||||
$("#txHash").attr("href", vsprintf("https://explorer.ether1.org/tx/%s", [rowData[3]]));
|
||||
$("#txFromAddress").html(rowData[4]);
|
||||
$("#txFromAddress").attr("href", vsprintf("https://explorer.ether1.org/addr/%s", [rowData[4]]));
|
||||
$("#txToAddress").html(rowData[5]);
|
||||
$("#txToAddress").attr("href", vsprintf("https://explorer.ether1.org/addr/%s", [rowData[5]]));
|
||||
$("#txValue").html(web3Local.utils.fromWei(EthoUtils.toFixed(parseFloat(rowData[6])).toString(), "ether"));
|
||||
|
||||
$("#dlgTransactionInfo a").off("click").on("click", function (even) {
|
||||
event.preventDefault();
|
||||
ipcRenderer.send("openURL", $(this).attr("href"));
|
||||
});
|
||||
|
||||
$("#btnTxInfoClose").off("click").on("click", function () {
|
||||
$("#dlgTransactionInfo").iziModal("close");
|
||||
});
|
||||
|
||||
$("#dlgTransactionInfo").iziModal("open");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user