git ssb

0+

wanderer🌟 / js-primea-hypervisor



Commit b725bc7ad54293c26697f1601c814ec603dc26fc

Environment: add isAccountPresent

Alex Beregszaszi committed on 8/28/2016, 11:54:31 AM
Parent: cd54c9d2a59c3fbfe2477fd39f5493ec90eebb6b

Files changed

environment.jschanged
environment.jsView
@@ -40,8 +40,17 @@
4040 account.set('storage', trie.storage || new Map())
4141 this.state.set(address.toString(), account)
4242 }
4343
44+ isAccountPresent (address) {
45+ const account = this.state.get(address.toString())
46+ if (account) {
47+ return true
48+ } else {
49+ return false
50+ }
51+ }
52+
4453 getBalance (address) {
4554 const account = this.state.get(address.toString())
4655 if (account) {
4756 return account.get('balance')

Built with git-ssb-web