Skip to content

Commit b07f0fa

Browse files
joe-pCopilot
andcommitted
fix: call .toString on the type instance instead of class
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 215ec35 commit b07f0fa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/util.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { APP_PAGE_MAX_SIZE } from './types/app'
2-
import { ABIArrayDynamicType, ABIArrayStaticType, ABIByteType, ABIReturnType, ABITupleType, ABIType, ABIValue } from 'algosdk'
2+
import { ABIArrayDynamicType, ABIArrayStaticType, ABIByteType, ABIReturnType, ABITupleType, ABIValue } from 'algosdk'
33

44
/**
55
* Converts a value which might be a number or a bigint into a number to be used with apis that don't support bigint.
@@ -111,7 +111,7 @@ export const calculateExtraProgramPages = (approvalProgram: Uint8Array, clearSta
111111
/** Take a decoded ABI value and convert all byte arrays (including nested ones) from number[] to Uint8Arrays */
112112
export function convertAbiByteArrays(value: ABIValue, type: ABIReturnType): ABIValue {
113113
// Return value as is if the type doesn't have any bytes or if it's already an Uint8Array
114-
if (!ABIType.toString().includes('byte') || value instanceof Uint8Array) {
114+
if (!type.toString().includes('byte') || value instanceof Uint8Array) {
115115
return value
116116
}
117117

0 commit comments

Comments
 (0)