Skip to content

Commit

Permalink
Add Aliases for old function names so its not a pain to upgrade to v4
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronmgdr committed May 20, 2022
1 parent c9787d1 commit 1d32590
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
6 changes: 6 additions & 0 deletions packages/react-celo/src/react-celo-provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,12 @@ export const CeloProvider: React.FC<CeloProviderProps> = ({
);
};

/**
*
* @deprecated Use the alias {@link CeloProvider} Component instead.
*/
export const ContractKitProvider = CeloProvider;

export interface CeloProviderProps {
children: ReactNode;
dapp: Dapp;
Expand Down
8 changes: 7 additions & 1 deletion packages/react-celo/src/use-celo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,20 @@ export function useCelo<CC = undefined>(): UseCelo {
};
}

/**
*
* @deprecated Use the alias {@link useCelo} hook instead.
*/
export const useContractKit = useCelo;

interface UseCeloInternal extends UseCelo {
connectionCallback: Maybe<(connector: Connector | false) => void>;
initConnector: (connector: Connector) => Promise<void>;
pendingActionCount: number;
}

/**
* useCelo with internal methods exposed. Package use only.
* @internal useCelo with internal methods exposed. Package use only.
*/
export const useCeloInternal = (): UseCeloInternal => {
const [
Expand Down

0 comments on commit 1d32590

Please sign in to comment.