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

Commit

Permalink
Merge pull request #468 from ethereum/develop
Browse files Browse the repository at this point in the history
Updates live wallet
  • Loading branch information
evertonfraga authored Mar 7, 2018
2 parents 9f2998d + d084d95 commit 5443eb6
Show file tree
Hide file tree
Showing 46 changed files with 184 additions and 722 deletions.
Binary file added .DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion app/.meteor/versions
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ ejson@1.0.11
ethereum:accounts@0.4.0
ethereum:blocks@0.3.2
ethereum:dapp-styles@0.5.7
ethereum:elements@0.7.17
ethereum:elements@0.7.18
ethereum:tools@0.7.0
ethereum:web3@0.15.3
fastclick@1.0.11
Expand Down
17 changes: 8 additions & 9 deletions app/client/lib/helpers/templateHelpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,26 +28,26 @@ Check if in mist
@method (isMist)
**/
Template.registerHelper('isMist', function(){
return (typeof mist !== 'undefined');
return (typeof window.mistMode === 'undefined');
});

/**
Check if in mist and in mist mode
@method (isMistMode)
@method (isWalletMode)
**/
Template.registerHelper('isWalletMode', function(){
return window.mistMode === 'wallet' || typeof mist === 'undefined'; // also show network info in normal browsers
});

/**
Check if currenct unit is an ether unit
Check if currency unit is an ether unit
@method (isEtherUnit)
**/
Template.registerHelper('isEtherUnit', function(){
var unit = EthTools.getUnit();
return !(unit === 'usd' || unit === 'eur' || unit === 'btc');
return !(unit === 'usd' || unit === 'eur' || unit === 'btc' || unit === 'gbp' || unit === 'brl');
});


Expand Down Expand Up @@ -85,7 +85,7 @@ Template.registerHelper('isVulnerable', function(address){
// add vulnerabilities to account
account.vulnerabilities = wallet.vulnerabilities;
return account;
} else
} else
return false;
});

Expand Down Expand Up @@ -114,7 +114,7 @@ Returns a list of accounts and wallets sorted by balance
**/
Template.registerHelper('selectAccounts', function(hideWallets){
var accounts = EthAccounts.find({balance:{$ne:"0"}}, {sort: {balance: 1}}).fetch();

if(hideWallets !== true)
accounts = _.union(Wallets.find({owners: {$in: _.pluck(EthAccounts.find().fetch(), 'address')}, address: {$exists: true}}, {sort: {name: 1}}).fetch(), accounts);

Expand Down Expand Up @@ -202,7 +202,7 @@ Formats a given transactions balance
Template.registerHelper('formatTransactionBalance', Helpers.formatTransactionBalance);


/**
/**
Formats address to a CaseChecksum
@method toChecksumAddress
Expand All @@ -215,12 +215,11 @@ Template.registerHelper('toChecksumAddress', function(address){



/**
/**
Takes a camelcase and shows it with spaces
@method toSentence
@param {string} camelCase A name in CamelCase or snake_case format
@return {string} sentence The same name with spaces
**/
Template.registerHelper('toSentence', Helpers.toSentence);

50 changes: 0 additions & 50 deletions app/client/lib/thirdparty/coinbase-widget.js

This file was deleted.

5 changes: 2 additions & 3 deletions app/client/styles/elements.import.less
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ span.address {
margin-bottom: 10px;
}

.dapp-actionbar .icon-bitcoin {
.dapp-actionbar .icon-ethereum {
height: 26px;
background-image: url('bitcoin-icon.svg');
background-image: url('ethereum-icon.svg');
background-repeat: no-repeat;
background-position: center;
}
Expand Down Expand Up @@ -690,7 +690,6 @@ table {
}
}


@keyframes jiggle {
0% { transform: rotate(-10deg); }
100% { transform: rotate(10deg); }
Expand Down
46 changes: 19 additions & 27 deletions app/client/templates/views/account.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
{{else}}
{{> dapp_identicon identity=address}}
<h1 class="{{ensClass}}">
<span>{{displayName}}</span>
<span>{{displayName}}</span>

{{#if $or owners jsonInterface}}
<button class="dapp-icon-button delete icon-trash"></button>
{{/if}}
</h1>
{{> elements_balance balance=balance changeUnit=true showAllDecimals=true}}
{{> elements_balance balance=balance changeUnit=true showAllDecimals=true}}
{{/with}}
</div>

Expand All @@ -27,11 +27,11 @@ <h1 class="{{ensClass}}">
<header class="{{ensClass}}">
<h1>
{{#if ens}}
<span>{{displayName}}</span>
<span>{{displayName}}</span>
{{else}}
<em class="edit-name">{{displayName}}</em>
<em class="edit-name">{{displayName}}</em>
<i class="edit-icon icon-pencil"></i>
{{/if}}
{{/if}}
</h1>
<h2 class="copyable-address">{{walletIcon}}
<!-- <input type="text" value="{{toChecksumAddress address}}" readonly class=""> -->
Expand Down Expand Up @@ -128,38 +128,30 @@ <h3>{{i18n "wallet.app.texts.note"}}</h3>
</li>

{{#if $eq ($.Session.get "network") "main"}}
<li>
<a href="https://shapeshift.io/shifty.html?destination={{address}}&amp;output=ETH&amp;apiKey=ef8312d8c9b9dda64fb852e8683eac6c33123f8743ff11383fb3bab29a364c01c27343fced4e628db8d5d66d763565763f8699c0fc903ec23db31cb908a944c8" target="_popup" data-popup-width="" data-popup-height="">
<i class="icon-bitcoin"></i>
{{i18n "wallet.accounts.buttons.depositBitcoin"}}
</a>
</li>
{{/if}}

{{#if $eq ($.Session.get "network") "main"}}
<li>
<button class="deposit-using-coinbase">
<i class="icon-credit-card"></i>
{{i18n "wallet.accounts.buttons.depositUsingCreditCard"}}
</button>
</li>
{{/if}}
{{#if ownedAccount}}
<li>
<a href="https://changelly.com/widget/v1?auth=email&from=USD&to=ETH&merchant_id=47f87f7cddda&address={{address}}&amount=1&ref_id=e25c5a2e8719&color=02a8f3" target="_blank">
<i class="icon-ethereum"></i>
{{i18n "wallet.accounts.buttons.buyEther"}}
</a>
</li>
{{/if}}

{{#if $eq ($.Session.get "network") "main"}}
<li>
<a href="https://etherscan.io/address/{{address}}">
<a href="https://etherscan.io/address/{{address}}" target="_blank">
<i class="icon-info"></i>
{{i18n "wallet.accounts.buttons.viewOnExplorer"}}
</a>
</li>
</li>
{{/if}}

<li>
<button class="copy-to-clipboard-button">
<i class="icon-docs"></i>
{{i18n "wallet.accounts.buttons.copyAddress"}}
</button>
</li>
</li>
<li>
<button class="qrcode-button">
<i class="icon-camera"></i>
Expand All @@ -173,7 +165,7 @@ <h3>{{i18n "wallet.app.texts.note"}}</h3>
{{i18n "wallet.accounts.buttons.showInterface"}}
</button>
</li>
{{/if}}
{{/if}}

</ul>
</nav>
Expand Down Expand Up @@ -202,7 +194,7 @@ <h2>{{i18n 'wallet.transactions.latest'}}</h2>
{{#with customContract}}
<h2>{{i18n 'wallet.events.latest'}}</h2>
<br>

<div>
<input type="checkbox" id="watch-events-checkbox" class="toggle-watch-events" checked="{{TemplateVar.get 'watchEvents'}}">
<label for="watch-events-checkbox">{{i18n "wallet.contracts.buttons.watchContractEvents"}}</label>
Expand All @@ -213,7 +205,7 @@ <h2>{{i18n 'wallet.events.latest'}}</h2>
{{> spinner}}
</div>
{{/if}}

{{> elements_event_table ids=contractEvents}}
{{/with}}
</div>
Expand Down
Loading

0 comments on commit 5443eb6

Please sign in to comment.