Skip to content

Commit c0be450

Browse files
fix: missing cfg prop on kms client call post rebase master
1 parent bd7069f commit c0be450

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/api/enclaved/recoveryMultisigTransaction.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ export async function recoveryMultisigTransaction(
1111
const { userPub, backupPub, unsignedSweepPrebuildTx, walletContractAddress } = req.body;
1212

1313
//fetch prv and check that pub are valid
14-
const userPrv = await retrieveKmsKey({ pub: userPub, source: 'user' });
15-
const backupPrv = await retrieveKmsKey({ pub: backupPub, source: 'backup' });
14+
const userPrv = await retrieveKmsKey({ pub: userPub, source: 'user', cfg: req.config });
15+
const backupPrv = await retrieveKmsKey({ pub: backupPub, source: 'backup', cfg: req.config });
1616

1717
if (!userPrv || !backupPrv) {
1818
const errorMsg = `Error while recovery wallet, missing prv keys for user or backup on pub keys user=${userPub}, backup=${backupPub}`;

src/api/enclaved/utils.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
// TODO: this function is duplicated in multisigTransactioSign.ts but as hardcoded. Replace that code later with this call (to avoid merge conflicts/duplication)
22
import { KmsClient } from '../../kms/kmsClient';
3+
import { EnclavedConfig } from '../../types';
34
export async function retrieveKmsKey({
45
pub,
56
source,
7+
cfg,
68
}: {
79
pub: string;
810
source: string;
11+
cfg: EnclavedConfig;
912
}): Promise<string> {
10-
const kms = new KmsClient();
13+
const kms = new KmsClient(cfg);
1114
// Retrieve the private key from KMS
1215
let prv: string;
1316
try {

0 commit comments

Comments
 (0)