Skip to content
This repository was archived by the owner on Mar 2, 2026. It is now read-only.
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 21 additions & 2 deletions src/background/controller/wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1104,8 +1104,27 @@ export class WalletController extends BaseController {
ids: number,
receiver: string
): Promise<string> => transactionService.bridgeNftFromEvmToFlow(flowIdentifier, ids, receiver);
getAssociatedFlowIdentifier = async (address: string): Promise<string> =>
transactionService.getAssociatedFlowIdentifier(address);
// getAssociatedFlowIdentifier = async (address: string): Promise<string> =>
// transactionService.getAssociatedFlowIdentifier(address);

getAssociatedFlowIdentifier = async (address: string): Promise<string> => {
const network = await userWalletService.getNetwork();
const allScripts = await openapiService.getCadenceScripts();
const encodedScript = allScripts.scripts[network]?.bridge?.getAssociatedFlowIdentifier;

if (!encodedScript) {
throw new Error('Script get_associated_flow_identifier not found in bridge category');
}

// Decode the base64 script
const script = atob(encodedScript);

const result = await fcl.query({
cadence: script,
args: (arg, t) => [arg(address, t.String)],
});
return result;
};
sendNFT = async (recipient: string, id: number, token: NFTModelV2): Promise<string> =>
transactionService.sendNFT(recipient, id, token);
sendNBANFT = async (recipient: string, id: number, token: NFTModelV2): Promise<string> =>
Expand Down
Loading