File tree 2 files changed +5
-5
lines changed
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 1
1
/* eslint-disable prettier/prettier */
2
2
import { BigNum } from '@dcspark/cardano-multiplatform-lib-nodejs' ;
3
3
import { CML } from './CML' ;
4
- import { HexBlob } from '../Cardano/util/primitives' ;
5
- import { Tx , TxBody } from '../Cardano/types' ;
4
+ import { HexBlob } from '../Cardano/util' ;
5
+ import { ManagedFreeableScope , usingAutoFree } from '@cardano-sdk/util' ;
6
+ import { Tx , TxBody } from '../Cardano' ;
6
7
import { newTx } from './cmlToCore' ;
7
- import { usingAutoFree } from '@cardano-sdk/util' ;
8
8
9
9
export const MAX_U64 = 18_446_744_073_709_551_615n ;
10
10
11
11
export const MIN_I64 = - 9_223_372_036_854_775_808n ;
12
12
export const MAX_I64 = 9_223_372_036_854_775_807n ;
13
13
14
- export const maxBigNum = BigNum . from_str ( MAX_U64 . toString ( ) ) ;
14
+ export const maxBigNum = ( scope : ManagedFreeableScope ) => scope . manage ( BigNum . from_str ( MAX_U64 . toString ( ) ) ) ;
15
15
16
16
export type CslObject = { to_bytes : ( ) => Uint8Array } ;
17
17
Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ export const tokenBundleSizeExceedsLimit =
72
72
return false ;
73
73
}
74
74
return usingAutoFree ( ( scope ) => {
75
- const value = scope . manage ( CML . Value . new ( cmlUtil . maxBigNum ) ) ;
75
+ const value = scope . manage ( CML . Value . new ( cmlUtil . maxBigNum ( scope ) ) ) ;
76
76
value . set_multiasset ( coreToCml . tokenMap ( scope , tokenBundle ) ) ;
77
77
78
78
return value . to_bytes ( ) . length > maxValueSize ;
You can’t perform that action at this time.
0 commit comments