ts-sdk
ts-sdk copied to clipboard
feat(nibijs): export string names of event types.
(Not from your change, but I just noticed) We should import this string rather than hard-coding it here. That way, if we change the version of `@nibiruchain/nibijs` and `@nibiruchain/protojs`, we'll always have the correct type set here.
For message types, we're able to import like this:
import { SPOT_MSG_TYPE_URLS } from "@nibiruchain/nibijs/dist/msg/spot"
// ...
(e) => e.type === SPOT_MSG_TYPE_URLS.MsgJoinPool
For events, there's no equivalent. We should implement these exports in nibijs
to make the emitted event types obvious.
Originally posted by @Unique-Divine in https://github.com/NibiruChain/web-app/pull/388#discussion_r1211931423