Skip to content

Commit

Permalink
Fix bigint from 64 to 32
Browse files Browse the repository at this point in the history
  • Loading branch information
PolyProgrammist committed Nov 2, 2024
1 parent 70260e1 commit ed262d1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/generators/typescript/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,19 +217,19 @@ export function getCondition(conditions: Array<BinaryExpression>): Expression {
}

export function isBigIntExpr(fieldType: TLBMathExprType) {
if (fieldType.expr instanceof TLBNumberExpr && fieldType.expr.n <= 64) {
if (fieldType.expr instanceof TLBNumberExpr && fieldType.expr.n <= 32) {
return false;
}
return true;
}

export function isBigInt(fieldType: TLBNumberType) {
if (fieldType.bits instanceof TLBNumberExpr) {
if (fieldType.bits.n <= 64) {
if (fieldType.bits.n <= 32) {
return false;
}
}
if (fieldType.maxBits && fieldType.maxBits <= 64) {
if (fieldType.maxBits && fieldType.maxBits <= 32) {
return false;
}
return true;
Expand Down

0 comments on commit ed262d1

Please sign in to comment.