@frak-labs/components
Version:
Frak Wallet components, helping any person to interact with the Frak wallet.
1 lines • 439 B
JavaScript
import{l as e}from"./loader.js";import{d as t,f as n}from"./defaults.DjBUlRT8.js";import{n as r}from"./rewards.BaTam2j1.js";function i(i,a,o,s){let[c,l]=t(void 0);return n(()=>{if(!i)return;let t=window.FrakSetup?.client;t&&e(t).then(e=>{let n=r(e.rewards,{currency:t.config.metadata?.currency,targetInteraction:a,audience:o,products:s});n&&n.payoutType!==`percentage`&&l(n.formatted)}).catch(()=>{})},[i,a,o,s]),{reward:c}}export{i as t};