walletToPCAIP10 function

String walletToPCAIP10(
  1. String account
)

Implementation

String walletToPCAIP10(String account) {
  if (account.contains("eip155:") && account.split(':').length == 2) {
    return account;
  }
  if (isValidCAIP10NFTAddress(account) || validateCAIP(account)) {
    return account;
  }
  return 'eip155:$account';
}