How to use the edge-core-js.makeContext function in edge-core-js

To help you get started, we’ve selected a few edge-core-js examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github EdgeApp / edge-login-ui / packages / edge-login-ui-react / src / abcui.js View on Github external
}

  const getAssetPath = args => {
    if (args.assetPath) {
      return args.assetsPath
    }
    if (args.bundlePath) {
      return args.bundlePath + '/assets'
    }
    if (!args.assetPath && !args.bundlePath) {
      return './assets'
    }
  }

  if (args.apiKey && args.appId) {
    const airbitzCoreJs = makeContext({
      apiKey: args.apiKey,
      appId: args.appId,
      accountType: args.accountType,
      authServer: getApiServer()
    })

    DomWindow.abcui = {
      assetPath: getAssetPath(args),
      abcuiContext: airbitzCoreJs,
      vendorName: args.vendorName,
      vendorImageUrl: args.vendorImageUrl
    }

    const getABCContext = () => {
      return airbitzCoreJs
    }