From 92af5b54e3f812fb9d6ad795bb33a5e291aa15ab Mon Sep 17 00:00:00 2001 From: Reed Rosenbluth <331327+reedrosenbluth@users.noreply.github.com> Date: Wed, 21 Oct 2020 10:14:20 -0400 Subject: [PATCH] fix: change default buffer encoding to hex in cvToString() function --- packages/transactions/src/clarity/clarityValue.ts | 2 +- packages/transactions/tests/clarity.test.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/transactions/src/clarity/clarityValue.ts b/packages/transactions/src/clarity/clarityValue.ts index de51f0742..e1a8609fa 100644 --- a/packages/transactions/src/clarity/clarityValue.ts +++ b/packages/transactions/src/clarity/clarityValue.ts @@ -54,7 +54,7 @@ export type ClarityValue = | StringAsciiCV | StringUtf8CV; -export function cvToString(val: ClarityValue, encoding: 'tryAscii' | 'hex' = 'tryAscii'): string { +export function cvToString(val: ClarityValue, encoding: 'tryAscii' | 'hex' = 'hex'): string { switch (val.type) { case ClarityType.BoolTrue: return 'true'; diff --git a/packages/transactions/tests/clarity.test.ts b/packages/transactions/tests/clarity.test.ts index 66ed228d9..9f0a12a1b 100644 --- a/packages/transactions/tests/clarity.test.ts +++ b/packages/transactions/tests/clarity.test.ts @@ -342,7 +342,7 @@ describe('Clarity Types', () => { (tuple (a -1) (b u1) - (c "test") + (c 0x74657374) (d true) (e (some true)) (f none)