Wallet Views

Overview

Wallet views allow you to filter the tokens in your wallets. If you want to get all koda cam photo tokens, you can use wallet views for that.

To get tokens in a view, simply call GetWalletView on the BP_ODK_WalletWorldService. You will need to pass in the WalletViewClass for the wallet view you care about.

Example of grabbing tokens in a view

Creating Wallet Views

You can define new wallet views by creating a new child of BP_ODK_WalletView. Then all you need to do is override IsRelevantToken on the wallet view to filter for tokens your view cares about. Here is an example of koda cam photos:

Example filtering logic

IMPORTANT: You can create your own custom views but should only do so if there is not an existing view that already filters in the same way. Having duplicate filter logic in two views will reduce the efficiancy of the system unnecessarily.

Checking Tokens

You can use IsTokenDataRelevantToView to check if a token fulfils the filter criteria of a wallet view. In the case below, we check if the token represents ownership of an emote.

Binding to Wallet View Events

You can bind to event on wallet views to be informed when tokens of a particular type change in your wallet. In the case below, we want to be informed whenever koda cam photos have been added or removed from a wallet. This particular event batches adds and removes together so that over a given frame, if there are multiple add and remove token events, the event will only be broadcast once.

Last updated