Comments (5)
Thanks @KBryan . I've assigned @DanBurton to work on "Implement formatAddress to turn a NetworkAccount into the way accounts are formatted for the given network".
In Reach's JavaScript support --- Address
is represented by an internal NetworkAccount
(see: https://docs.reach.sh/ref-frontends-js-types.html ) which on Algorand is just the public key, which you see displayed there. However, it is typical for people to not think of their public key as their address, but instead to write out the base32 encoding of the public key AND a checksum. You can see this in this function of the Algorand JS SDK --- https://github.com/algorand/js-algorand-sdk/blob/fd187cedab70cb123333ba62ca3e6fe98c1e7d3d/src/encoding/address.ts#L94-L110
Basically, we will make it so that Reach has a way to "format for user consumption" an address, just like we have formatCurrency
.
Thanks again!
from reach-lang.
Sounds good, will keep this issue open until the solution mentioned has been implemented and tested.
from reach-lang.
There is a new stdlib function, formatAddress
, that is available for this. It accepts an Account
, NetworkAccount
, or an Address
, and formats it in the network-specific way users expect to see it.
https://docs.reach.sh/ref-frontends-js-utils.html#%28javascript._%28%28format.Address%29%29%29
Available as of @reach-sh/[email protected]
from reach-lang.
Ok, are there any test cases for this?
from reach-lang.
If you're curious:
279dcbd#diff-238f2c0082bb61188656d618a2e0069050a4512be69c42a0fd3b798ce7a42042
from reach-lang.
Related Issues (20)
- Getting Error("no log for ".concat(o_lab)) when using remote call HOT 3
- "logic eval error: fee too small" when upgrading to latest Reach (f33abc3d) HOT 11
- While creating ASA in algorand using stdlib.launchToken(), opts.metaDataHash value is ignored and not set in the asset. HOT 4
- Feature Request: Add manager address in opts for stdlib.launchToken() for Alogrand network HOT 1
- WalletConnect producing undefined importKey error HOT 2
- Feature Request: Use algod for asset information if reading is allowed. HOT 2
- Reach Compiler Error HOT 2
- Reach seems to produce impossible values for counter-example to failed "check" statement HOT 2
- launchToken does not set manager address in Algorand TestNet HOT 2
- Compiler error when using .fromObject HOT 1
- Pera wallet connect not working HOT 2
- Unable to import stdlib in Vite HOT 1
- Reach run gives error on latest version
- Reach run gives error on latest version HOT 2
- Not able to import modules in versions after 0.1.13rc0 (f79282c4)
- Remote object call triggers an assumption error
- Sqrt fails formal verification HOT 5
- feat: integrate algorand community's use-wallet HOT 1
- fix: please upgrade Reach's Walletconnect from v1 to v2
- test
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from reach-lang.