Skip to content

Commit

Permalink
Merge pull request MetaMask#72 from MetaMask/BboyAkers-live-coding
Browse files Browse the repository at this point in the history
Pushing selected Address and Get Account By Async Examples
  • Loading branch information
BboyAkers authored Mar 12, 2020
2 parents 5d38fff + f97dfe9 commit ed399e8
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
3 changes: 1 addition & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,4 @@ footer: MIT Licensed
#### Current List of Guides

* [Learning Solidity](https://karl.tech/learning-solidity-part-1-deploy-a-contract/) by karl Floersch
* [CryptoZombies](https://cryptozombies.io/)
<demo-1/>
* [CryptoZombies](https://cryptozombies.io/)
7 changes: 7 additions & 0 deletions docs/guide/accessing-accounts.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ All of those methods require the sending account as a function parameter:

Once you've [connected to a user](./getting-started.html), you can always re-check the current account by checking `ethereum.selectedAddress`.

<p class="codepen" data-height="265" data-theme-id="dark" data-default-tab="js,result" data-user="BboyAkers" data-slug-hash="MWwQzeB" style="height: 265px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; border: 2px solid; margin: 1em 0; padding: 1em;" data-pen-title="Selected Address Example">
<span>See the Pen <a href="https://codepen.io/BboyAkers/pen/MWwQzeB">
Selected Address Example</a> by Austin Akers (<a href="https://codepen.io/BboyAkers">@BboyAkers</a>)
on <a href="https://codepen.io">CodePen</a>.</span>
</p>
<script async src="https://static.codepen.io/assets/embed/ei.js"></script>

If you'd like to be notified when the address changes, we have an event you can subscribe to:

```javascript
Expand Down
8 changes: 8 additions & 0 deletions docs/guide/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,14 @@ const account = accounts[0] // We currently only ever provide a single account,
// but the array gives us some room to grow.
```

<p class="codepen" data-height="265" data-theme-id="dark" data-default-tab="js,result" data-user="BboyAkers" data-slug-hash="gOpvrGb" style="height: 265px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; border: 2px solid; margin: 1em 0; padding: 1em;" data-pen-title="Get Account By Async">
<span>See the Pen <a href="https://codepen.io/BboyAkers/pen/gOpvrGb">
Get Account By Async</a> by Austin Akers (<a href="https://codepen.io/BboyAkers">@BboyAkers</a>)
on <a href="https://codepen.io">CodePen</a>.</span>
</p>
<script async src="https://static.codepen.io/assets/embed/ei.js"></script>


## Choosing a Convenience Library

Convenience libraries exist for a variety of reasons.
Expand Down

0 comments on commit ed399e8

Please sign in to comment.