Skip to content

Commit

Permalink
update handleCoinType to be safari compatible (MystenLabs#1938)
Browse files Browse the repository at this point in the history
* update handleCoinType to be safari compatible

remove log

* Update stringUtils.ts

* Update stringUtils.ts

* Update stringUtils.ts

* lint changes
  • Loading branch information
Stella Cannefax authored May 13, 2022
1 parent a9943f7 commit 0d96f87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion explorer/client/src/utils/stringUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const trimStdLibPrefix = (str: string): string =>
export const handleCoinType = (str: string): string =>
str === '0x2::Coin::Coin<0x2::SUI::SUI>'
? 'SUI'
: str.match(/(?<=<)[a-zA-Z0-9:]+(?=>)/)?.[0] || str;
: str.match(/^([a-zA-Z0-9:]*)<([a-zA-Z0-9:]*)>$/)?.[2] || str;

export const processDisplayValue = (display: { bytes: number[] } | string) => {
const url =
Expand Down

0 comments on commit 0d96f87

Please sign in to comment.