diff options
| author | Pawel Zelawski <pawel@pzelawski.com> | 2026-05-23 10:33:53 +0200 |
|---|---|---|
| committer | Pawel Zelawski <pawel@pzelawski.com> | 2026-05-23 10:33:53 +0200 |
| commit | 376feecb280c28504788c9677c6cb3cc455f00b6 (patch) | |
| tree | ebf3ee7ac5e67560a98f51e3815f9b7a414734df /src/server/utils.ts | |
| parent | eafdcd8290700fdeaa6b069c4d52e50a9db6ad94 (diff) | |
chore: upgrade digiid-ts to v3 and stabilize dev/build scripts
Diffstat (limited to 'src/server/utils.ts')
| -rw-r--r-- | src/server/utils.ts | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/server/utils.ts b/src/server/utils.ts index 0b1333f..bb614c0 100644 --- a/src/server/utils.ts +++ b/src/server/utils.ts @@ -1,6 +1,9 @@ // Simple utility to determine DigiByte address type based on prefix -export type DigiByteAddressType = 'DigiByte (DGB)' | 'DigiAsset (DGA)' | 'Unknown'; +export type DigiByteAddressType = + | 'DigiByte (DGB)' + | 'DigiAsset (DGA)' + | 'Unknown'; export function getDigiByteAddressType(address: string): DigiByteAddressType { if (address.startsWith('dgb1')) { @@ -10,11 +13,12 @@ export function getDigiByteAddressType(address: string): DigiByteAddressType { // For now, assume non-DGB is DigiAsset, but this might need refinement // depending on actual DigiAsset address formats. // If the digiid-ts library provides a helper for this, use that instead. - else if (address) { // Basic check to differentiate from empty/null + else if (address) { + // Basic check to differentiate from empty/null // Assuming DigiAssets might start differently or be the fallback // This is a placeholder assumption. // A more robust check based on DigiAsset address specification is needed. return 'DigiAsset (DGA)'; // Placeholder - ADJUST BASED ON ACTUAL DGA PREFIX } return 'Unknown'; -}
\ No newline at end of file +} |
