How to use the edge-core-js/types.errorNames.InsufficientFundsError 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-react-gui / src / actions / CryptoExchangeActions.js View on Github external
}

        case 'noVerification': {
          if (error.pluginName === 'shapeshift') {
            Airship.show(bridge => )
            return
          }
          break // Not handled
        }
      }
      break // Not handled
    }
  }

  // Some plugins get this error wrong:
  if (error.message === errorNames.InsufficientFundsError) {
    return dispatch({ type: 'RECEIVED_INSUFFICENT_FUNDS_ERROR' })
  }

  // Anything else:
  return dispatch({
    type: 'GENERIC_SHAPE_SHIFT_ERROR',
    data: error.message
  })
}