Skip to content

Commit 99a2036

Browse files
committed
Revert "feat(udt): Udt.complete* methods"
This reverts commit 4393803. It will be moved to a new branch `feat/udt`
1 parent a789668 commit 99a2036

File tree

11 files changed

+61
-2292
lines changed

11 files changed

+61
-2292
lines changed

.changeset/plenty-ads-rush.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

.changeset/shy-horses-agree.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

packages/core/src/ckb/transaction.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1911,12 +1911,6 @@ export class Transaction extends mol.Entity.Base<
19111911
);
19121912
}
19131913

1914-
/**
1915-
* @deprecated Use `Udt.getInputsBalance` from `@ckb-ccc/udt` instead
1916-
* @param client
1917-
* @param type
1918-
* @returns
1919-
*/
19201914
async getInputsUdtBalance(client: Client, type: ScriptLike): Promise<Num> {
19211915
return reduceAsync(
19221916
this.inputs,
@@ -1932,11 +1926,6 @@ export class Transaction extends mol.Entity.Base<
19321926
);
19331927
}
19341928

1935-
/**
1936-
* @deprecated Use `Udt.getOutputsBalance` from `@ckb-ccc/udt` instead
1937-
* @param type
1938-
* @returns
1939-
*/
19401929
getOutputsUdtBalance(type: ScriptLike): Num {
19411930
return this.outputs.reduce((acc, output, i) => {
19421931
if (!output.type?.eq(type)) {
@@ -2054,7 +2043,6 @@ export class Transaction extends mol.Entity.Base<
20542043
* This method succeeds only if enough balance is collected.
20552044
*
20562045
* It will try to collect at least two inputs, even when the first input already contains enough balance, to avoid extra occupation fees introduced by the change cell. An edge case: If the first cell has the same amount as the output, a new cell is not needed.
2057-
* @deprecated Use `Udt.completeInputsByBalance` from `@ckb-ccc/udt` instead
20582046
* @param from - The signer to complete the inputs.
20592047
* @param type - The type script of the UDT.
20602048
* @param balanceTweak - The tweak of the balance.

packages/core/src/ckb/transactionErrors.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ export class ErrorTransactionInsufficientCapacity extends Error {
2222
}
2323
}
2424

25-
/**
26-
* @deprecated Use `ErrorUdtInsufficientCoin` from `@ckb-ccc/udt` instead.
27-
*/
2825
export class ErrorTransactionInsufficientCoin extends Error {
2926
public readonly amount: Num;
3027
public readonly type: Script;

packages/ssri/src/executor.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,6 @@ export class ExecutorResponse<T> {
6363
throw new ExecutorErrorDecode(JSON.stringify(err));
6464
}
6565
}
66-
67-
async mapAsync<U>(fn: (res: T) => Promise<U>): Promise<ExecutorResponse<U>> {
68-
try {
69-
return new ExecutorResponse(await fn(this.res), this.cellDeps);
70-
} catch (err) {
71-
throw new ExecutorErrorDecode(JSON.stringify(err));
72-
}
73-
}
7466
}
7567

7668
/**

packages/udt/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
}
2424
},
2525
"scripts": {
26-
"test": "vitest",
26+
"test": "jest",
2727
"build": "rimraf ./dist && rimraf ./dist.commonjs && tsc && tsc --project tsconfig.commonjs.json && copyfiles -u 2 misc/basedirs/**/* .",
2828
"lint": "eslint ./src",
2929
"format": "prettier --write . && eslint --fix ./src"

0 commit comments

Comments
 (0)