getWepinSdkUrl function

Map<String, String> getWepinSdkUrl(
  1. String apiKey
)

Implementation

Map<String, String> getWepinSdkUrl(String apiKey) {
  final keyType = WepinKeyTypeExtension.fromAppKey(apiKey);
  switch (keyType) {
    case WepinKeyType.dev:
      return {
        // 'wepinWebview': 'https://localhost:8989/',
        'wepinWebview': 'https://dev-v1-widget.wepin.io/',
        'sdkBackend': 'https://dev-sdk.wepin.io/v1/',
        'wallet': 'https://dev-app.wepin.io/',
      };
    case WepinKeyType.stage:
      return {
        'wepinWebview': 'https://stage-v1-widget.wepin.io/',
        'sdkBackend': 'https://stage-sdk.wepin.io/v1/',
        'wallet': 'https://stage-app.wepin.io/',
      };
    case WepinKeyType.prod:
      return {
        'wepinWebview': 'https://v1-widget.wepin.io/',
        'sdkBackend': 'https://sdk.wepin.io/v1/',
        'wallet': 'https://app.wepin.io/',
      };
    default:
      throw WepinError(WepinErrorCode.invalidAppKey);
  }
}