Skip to content

Commit c77501d

Browse files
committed
fix: gemini CR issues
1 parent 87b1d04 commit c77501d

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

packages/ccc/src/signersController.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { METAMASK_SVG } from "./assets/metamask.svg.js";
1414
import { NOSTR_SVG } from "./assets/nostr.svg.js";
1515
import { OKX_SVG } from "./assets/okx.svg.js";
1616
import { REI_SVG } from "./assets/rei.svg.js";
17-
import { SUPERISE_SVG } from "./assets/superise.svg";
17+
import { SUPERISE_SVG } from "./assets/superise.svg.js";
1818
import { UNI_SAT_SVG } from "./assets/uni-sat.svg.js";
1919
import { UTXO_GLOBAL_SVG } from "./assets/utxo-global.svg.js";
2020

packages/superise/src/barrel.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
export * from "./ckb";
2-
export * from "./signersFactory";
1+
export * from "./ckb/index.js";
2+
export * from "./signersFactory.js";

packages/superise/src/ckb/index.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ export class CkbSigner extends ccc.Signer {
3939
if (!connection) return;
4040
try {
4141
this.connection = JSON.parse(connection) as CkbConnection;
42-
} catch {}
42+
} catch (error) {
43+
console.error("Failed to restore superise connection:", error);
44+
}
4345
}
4446

4547
private async getConnection() {
@@ -141,12 +143,14 @@ export class CkbSigner extends ccc.Signer {
141143
metadata: SignCkbHashAllMetadata,
142144
) {
143145
const txHash = ccc.Transaction.from(tx).hash();
144-
this._uiMetadataMap = { [txHash]: metadata };
146+
this._uiMetadataMap[txHash] = metadata;
145147
}
146148

147149
private getUiMetadataFromTx(tx: ccc.TransactionLike) {
148150
const txHash = ccc.Transaction.from(tx).hash();
149-
return this._uiMetadataMap[txHash];
151+
const metadata = this._uiMetadataMap[txHash];
152+
delete this._uiMetadataMap[txHash];
153+
return metadata;
150154
}
151155

152156
override async prepareTransaction(txLike: ccc.TransactionLike) {

0 commit comments

Comments
 (0)