Closed TomaszGol closed 2 months ago
The changes introduce a NicknameResolver
for managing nicknames linked to wallet addresses within a GraphQL API. This includes the creation of a Nickname
class and a NicknameProvider
class that retrieves display names through the Polkadot API. Additionally, the import statements for ApiPromise
in several utility files have been updated to use ES6 module syntax, enhancing consistency across the codebase.
File Path | Change Summary |
---|---|
src/server-extension/resolvers/index.ts |
Added export for NicknameResolver . |
src/server-extension/resolvers/nicknameResolver.ts |
Introduced Nickname and NicknameResolver classes with a getNickname method for querying nicknames. |
src/utils/nicknameProvider.ts |
Implemented NicknameProvider class with a static getNickname method to fetch display names from the Polkadot API. |
src/utils/marginDataProvider.ts , src/utils/marginProvider.ts , src/utils/provider.ts |
Changed import of ApiPromise from CommonJS require to ES6 import . |
sequenceDiagram
participant Client
participant NicknameResolver
participant NicknameProvider
participant PolkadotAPI
Client->>NicknameResolver: getNickname(walletAddress)
NicknameResolver->>NicknameProvider: getNickname(walletAddress)
NicknameProvider->>PolkadotAPI: Query identityOf(walletAddress)
PolkadotAPI-->>NicknameProvider: Return identity info
NicknameProvider-->>NicknameResolver: Return display name or undefined
NicknameResolver-->>Client: Return Nickname object
π° In fields of green, I hop with glee,
New nicknames bloom, oh what a spree!
With wallets bright, we dance and play,
Fetching names in a joyful way!
Hooray for changes, letβs all cheer,
For bunnies and nicknames, the time is here! πβ¨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Summary by CodeRabbit
New Features
NicknameResolver
for querying nicknames associated with wallet addresses via GraphQL.NicknameProvider
utility to fetch user-friendly names from blockchain identities.Improvements