-
Notifications
You must be signed in to change notification settings - Fork 20
Migration Guide for v2
Debajit Roy edited this page Oct 10, 2023
·
9 revisions
- Install the latest v2 package.
- Change the import statement to
import { Transak } from '@transak/transak-sdk'
and update it's usage everywhere - Change all instances of
transak.on
toTransak.on
. - Change
transak.ALL_EVENTS
to'*'
- Change all instances of
transak.EVENTS
toTransak.EVENTS
. - If you are currently using the
TRANSAK_WIDGET_OPEN
event, please update it to useTRANSAK_WIDGET_INITIALISED
instead. - You should now be up and running. Happy coding!
-
Transak
has been changed to a named export. - The
on
method is now a static method accessible viaTransak.on
. -
transak.ALL_EVENTS
has been removed. Please use'*'
going forward. -
TRANSAK_WIDGET_OPEN
has been removed. Please useTRANSAK_WIDGET_INITIALISED
going forward. - The
EVENTS
property is now a static property accessible viaTransak.EVENTS
.
- TypeScript support is now available.
- Environment values are accessible under
Transak.ENVIRONMENTS
.
- Calling the
init
method multiple times no longer results in the addition of multiple modal DOM elements. - A 100% height no longer hides the Close button.
- The Close button is now rendered without any delay.
- Z-index values have been increased to ensure that the Transak modal renders above other modal libraries.