Registry / decentralized-finance / kane-zap-migration-widgets

kane-zap-migration-widgets

JSON →
library1.2.2jsnpmunverified

React components for Zap Protocol liquidity operations (add/increase liquidity) with PancakeSwap integration. Current stable version: 1.2.2. Release cadence: irregular, tied to KyberSwap widget updates. Key differentiators: provides embeddable UI for zapping into PancakeSwap pools, supports custom fee addresses, and offers theme matching (dark/light). Requires React 16.8+ and peer dependencies react-dom. Includes TypeScript types and examples.

npm install kane-zap-migration-widgets
INSTALL
IMPORT
SIG · KANE-ZAP-MIGRATION
K
kane-zap-migration-widgets
decentralized-financejavascriptv1.2.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

LiquidityWidget
import { LiquidityWidget } from '@kyberswap/pancake-liquidity-widgets'
const LiquidityWidget = require('@kyberswap/pancake-liquidity-widgets')
ESM-only; cannot use require(). TypeScript types included.
LiquidityWidgetProps
import type { LiquidityWidgetProps } from '@kyberswap/pancake-liquidity-widgets'
Type import is valid; library ships types.
default
import LiquidityWidget from '@kyberswap/pancake-liquidity-widgets'
import { default as LiquidityWidget } from '@kyberswap/pancake-liquidity-widgets'
Default import works, but named import is preferred.

Renders a liquidity widget with required props: source, account, networkChainId, chainId, poolAddress.

import React from 'react'; import { LiquidityWidget } from '@kyberswap/pancake-liquidity-widgets'; function App() { return ( <LiquidityWidget source="my-dapp" account="0x..." networkChainId={56} chainId={56} poolAddress="0x..." theme="dark" onDismiss={() => console.log('dismissed')} onTxSubmit={(txHash) => console.log(txHash)} onConnectWallet={() => console.log('connect')} /> ); }
Debug
Known issues
breakingRequires React 16.8+ and peer dependencies react-dom
fix
Ensure React and react-dom are installed and version >=16.8.0.
affects: >=1.0.0
gotchaaccount prop must be a string; if empty string, widget may not render properly
fix
Provide a valid Ethereum address or connect wallet before passing.
affects: >=1.0.0
deprecatedinitDepositToken using native token address 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE; future versions may change
fix
Use the current address string, but check changelog for updates.
affects: >=1.0.0
Errors
Common errors & fixes
Uncaught TypeError: Cannot read properties of undefined (reading 'useState')
React version mismatch or missing React peer dependency.
fix
Install react@>=16.8.0 and react-dom@>=16.8.0.
Module not found: Can't resolve '@kyberswap/pancake-liquidity-widgets'
Package not installed or typo in import path.
fix
Run npm install @kyberswap/pancake-liquidity-widgets.
TypeError: (0 , _pancakeLiquidityWidgets.LiquidityWidget) is not a function
Using require() in an ESM context, or default import incorrectly.
fix
Use import { LiquidityWidget } from '@kyberswap/pancake-liquidity-widgets'.
Upgrade
Version history
1.2.2latest on npm
Audit
Dependencies
reactrequiredPeer dependency for component rendering
react-domrequiredPeer dependency for DOM rendering
Agent activity
4 hits · last 30 days
node
4
Resources
kane-zap-migration-widgets — npm install kane-zap-migration-widgets · libregistry