Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@bloks/constants

Package Overview
Dependencies
Maintainers
1
Versions
163
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bloks/constants - npm Package Compare versions

Comparing version 3.4.3 to 3.4.4

4

package.json
{
"name": "@bloks/constants",
"version": "3.4.3",
"version": "3.4.4",
"description": "",

@@ -12,3 +12,3 @@ "publishConfig": {

"license": "UNLICENSED",
"gitHead": "85872ce34dcb2f0eaa756cbf9c46b9733309a14c"
"gitHead": "d90b70e481755295dd325d509effd98da106c40b"
}

@@ -22,10 +22,13 @@ import { contractAccounts } from '../contractAccounts'

constructor () {
if (Constants.instance) {
if (!!Constants.instance) {
return Constants.instance
}
}
this.changeChain()
initialize (chain = 'eos') {
this.changeChainCallbacks = []
this.changeChain(chain)
}
changeChain (chain = 'eos') {
changeChain (chain) {
const constants = chainToNetworkConstantsMap[chain]

@@ -40,4 +43,14 @@ for (const [key, value] of Object.entries(constants)) {

}
// Callbacks
for (const cb of this.changeChainCallbacks) {
console.log(cb)
cb.apply(null)
}
}
addChainChangeCallback (cb) {
this.changeChainCallbacks.push(cb)
}
setConstants (newConstants) {

@@ -44,0 +57,0 @@ for (const [key, value] of Object.entries(newConstants)) {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc