import TimeImg from "../assets/tokens/TIME.svg" ; import MemoImg from "../assets/tokens/MEMO.png" ; function toUrl ( tokenPath ) { const host = window . location . origin ; return `${ host }/${ tokenPath }` ; } export function getTokenUrl ( name ) { if ( name === "time" ) { return toUrl ( TimeImg ) ; } if ( name === "memo" ) { return toUrl ( MemoImg ) ; } throw Error ( `Token url doesn't support: ${ name }` ) ; }