Skip to content

Commit

Permalink
Merge 20e792d into 4c85760
Browse files Browse the repository at this point in the history
  • Loading branch information
pbca26 authored Dec 1, 2021
2 parents 4c85760 + 20e792d commit b2c5c70
Show file tree
Hide file tree
Showing 12 changed files with 34 additions and 24 deletions.
2 changes: 1 addition & 1 deletion electron/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "hw-kmd-wallet-electron",
"version": "0.2.9",
"version": "0.3.0",
"description": "Komodo Hardware Wallet Electron App",
"main": "main.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hw-kmd-wallet",
"version": "0.2.9",
"version": "0.3.0",
"author": "Luke Childs <[email protected]> (http://lukechilds.co.uk), Komodo Platform (https://komodoplatform.com)",
"repository": "pbca26/hw-kmd-wallet",
"homepage": "https://pbca26.github.io/hw-kmd-wallet",
Expand Down
4 changes: 1 addition & 3 deletions src/Accounts.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ const Accounts = ({
{coins[activeCoin].accounts[activeAccount].claimableAmount > 0 &&
<ClaimRewardsButton
account={coins[activeCoin].accounts[activeAccount]}
handleRewardClaim={this.handleRewardClaim}
vendor={vendor}
balance={coins[activeCoin].accounts[activeAccount].balance}
syncData={syncData}
Expand All @@ -180,8 +179,7 @@ const Accounts = ({
<Transactions
accounts={coins[activeCoin].accounts.filter((acc) => acc.enabled)}
activeAccount={activeAccount}
coin={activeCoin}
/>
coin={activeCoin} />
</div>
);

Expand Down
1 change: 0 additions & 1 deletion src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,6 @@ class App extends React.Component {
vendor={this.state.vendor}
accounts={this.state.activeCoin ? this.state.coins[this.state.activeCoin].accounts : []}
syncData={this.syncData}
handleRewardClaim={this.handleRewardClaim}
loginModalClosed={this.state.loginModalClosed}
setVendor={this.setVendor} />

Expand Down
9 changes: 5 additions & 4 deletions src/CheckAllBalancesButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
isElectron,
appData,
} from './Electron';
import {writeLog} from './Debug';

const headings = [
'Coin',
Expand Down Expand Up @@ -88,7 +89,7 @@ class CheckAllBalancesButton extends React.Component {
let longestBlockHeight = 0;
let apiEndPointIndex = 0;

console.warn('checkExplorerEndpoints', getInfoRes);
writeLog('checkExplorerEndpoints', getInfoRes);

for (let i = 0; i < coins[coin].api.length; i++) {
if (getInfoRes[i] &&
Expand All @@ -101,7 +102,7 @@ class CheckAllBalancesButton extends React.Component {
}
}

console.warn(`${coin} set api endpoint to ${coins[coin].api[apiEndPointIndex]}`);
writeLog(`${coin} set api endpoint to ${coins[coin].api[apiEndPointIndex]}`);
blockchain[blockchainAPI].setExplorerUrl(coins[coin].api[apiEndPointIndex]);
isExplorerEndpointSet = true;

Expand Down Expand Up @@ -162,7 +163,7 @@ class CheckAllBalancesButton extends React.Component {
});
//this.setState({...this.initialState});
} catch (error) {
console.warn(error);
writeLog(error);
updateActionState(this, currentAction, false);
this.setState({error: error.message});
}
Expand All @@ -188,7 +189,7 @@ class CheckAllBalancesButton extends React.Component {
});
}

console.warn(this.state);
writeLog(this.state);

blockchain[blockchainAPI].setExplorerUrl(this.props.explorerEndpoint);
};
Expand Down
2 changes: 0 additions & 2 deletions src/ClaimRewardsButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@ const ClaimRewardsButton = ({
syncData,
coin,
tiptime,
handleRewardClaim,
claimableAmount,
}) => (
<SendCoinButton
account={account}
handleRewardClaim={handleRewardClaim}
vendor={vendor}
balance={balance}
syncData={syncData}
Expand Down
1 change: 0 additions & 1 deletion src/SendCoinButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,6 @@ class SendCoinButton extends React.Component {
}
updateActionState(this, currentAction, true);

this.props.handleRewardClaim(txid);
this.setState({
success:
<React.Fragment>
Expand Down
14 changes: 12 additions & 2 deletions src/Sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ import SendCoinButton from './SendCoinButton';
import ReceiveCoinButton from './ReceiveCoinButton';
import SettingsModal from './SettingsModal';
import {writeLog} from './Debug';
import {
isElectron,
shell,
} from './Electron';

class Sidebar extends React.Component {
state = this.initialState;
Expand Down Expand Up @@ -34,7 +38,6 @@ class Sidebar extends React.Component {
{this.props.activeCoin &&
<SendCoinButton
accounts={this.props.accounts}
handleRewardClaim={this.props.handleRewardClaim}
vendor={this.props.vendor}
syncData={this.props.syncData}
coin={this.props.activeCoin}>
Expand All @@ -55,7 +58,14 @@ class Sidebar extends React.Component {
setVendor={this.props.setVendor} />
}
<li>
<a href="https://github.com/pbca26/hw-kmd-wallet/issues/new"><i className="fa fa-life-ring"></i></a>
{isElectron &&
<a onClick={() => shell.openExternal('https://github.com/pbca26/hw-kmd-wallet/issues/new')}><i className="fa fa-life-ring"></i></a>
}
{!isElectron &&
<a
target="_blank"
href="https://github.com/pbca26/hw-kmd-wallet/issues/new"><i className="fa fa-life-ring"></i></a>
}
</li>
<AboutModal />
</ul>
Expand Down
10 changes: 3 additions & 7 deletions src/TransactionViewModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class TransactionDetailsModal extends React.Component {
<td>
<strong>Account</strong>
</td>
<td>{coin} {tx.accountIndex + 1}</td>
<td>{coin} {(tx.accountIndex || this.props.activeAccount) + 1}</td>
</tr>
<tr>
<td>
Expand Down Expand Up @@ -91,9 +91,7 @@ class TransactionDetailsModal extends React.Component {
<div className="modal-action-block center">
{isElectron &&
<a onClick={() => shell.openExternal(`${coins[coin].explorer}tx/${tx.txid}`)}>
<button
className="button is-primary"
onClick={this.confirm}>
<button className="button is-primary">
Open in explorer <i className="fa fa-external-link-alt"></i>
</button>
</a>
Expand All @@ -102,9 +100,7 @@ class TransactionDetailsModal extends React.Component {
<a
target="_blank"
href={`${coins[coin].explorer}tx/${tx.txid}`}>
<button
className="button is-primary"
onClick={this.confirm}>
<button className="button is-primary">
Open in explorer <i className="fa fa-external-link-alt"></i>
</button>
</a>
Expand Down
1 change: 1 addition & 0 deletions src/Transactions.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ class Transactions extends React.Component {
<TransactionViewModal
coin={coin}
tx={this.state.txDetails}
activeAccount={activeAccount}
/>
</div>
}
Expand Down
4 changes: 2 additions & 2 deletions src/lib/coins.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,15 @@ const coins = {
],
},
RICK: {
explorer: 'https://rick.kmd.dev/',
explorer: 'https://rick.explorer.dexstats.info/',
api: [
'https://explorer.komodoplatform.com:10000/rick/api/',
'https://rick.explorer.dexstats.info/insight-api-komodo/',
'https://rick.kmd.dev/insight-api-komodo/',
],
},
MORTY: {
explorer: 'https://morty.kmd.dev/',
explorer: 'https://morty.explorer.dexstats.info/',
api: [
'https://morty.explorer.dexstats.info/insight-api-komodo/',
'https://explorer.komodoplatform.com:10000/morty/api/',
Expand Down
8 changes: 8 additions & 0 deletions src/uiv2.scss
Original file line number Diff line number Diff line change
Expand Up @@ -792,4 +792,12 @@ select:-moz-focusring {
margin-right: 5px;
font-size: 0.75rem;
}
}

.Modal-about {
a,
a:hover {
text-decoration: underline;
color: #121958 !important;
}
}

0 comments on commit b2c5c70

Please sign in to comment.