]> git.codecow.com Git - libnemo.git/commitdiff
Fix default amount units.
authorChris Duncan <chris@zoso.dev>
Thu, 7 Aug 2025 19:49:17 +0000 (12:49 -0700)
committerChris Duncan <chris@zoso.dev>
Thu, 7 Aug 2025 19:49:17 +0000 (12:49 -0700)
src/lib/block.ts

index 7ac1bc052a6082abeef73cb3fee35ad933c8b4c8..1900d2174419e0e3932d8bf53c707e3c73039dab 100644 (file)
@@ -295,7 +295,7 @@ export class Block {
                        }
                        this.subtype = 'receive'
 
-                       unit ??= UNITS.RAW
+                       unit ??= 'RAW'
                        if (typeof unit !== 'string' || typeof UNITS[unit] !== 'number') {
                                throw new TypeError('Invalid unit')
                        }
@@ -338,7 +338,7 @@ export class Block {
                        }
                        this.subtype = 'send'
 
-                       unit ??= UNITS.RAW
+                       unit ??= 'RAW'
                        if (typeof unit !== 'string' || typeof UNITS[unit] !== 'number') {
                                throw new TypeError('Invalid unit')
                        }