Skip to content

Commit b9dcb5d

Browse files
committed
fix: enable kms via env
1 parent 7adb9b6 commit b9dcb5d

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

src/server/blockchain/AdminWallet.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ const options = {
277277
maxPriorityFeePerGas: (1e9).toFixed(0)
278278
}
279279

280-
export const createAdminWallet = (useKMS = false) => {
280+
export const createAdminWallet = (useKMS = conf.kmsEnabled) => {
281281
return new AdminWallet('AdminWallet', conf, options, useKMS)
282282
}
283283

src/server/blockchain/Web3Wallet.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export class Web3Wallet {
9797
return this.initialize()
9898
}
9999

100-
constructor(name, conf, options = null, useKMS = false) {
100+
constructor(name, conf, options = null, useKMS = conf.kmsEnabled) {
101101
const {
102102
ethereum = null,
103103
network = null,

src/server/server.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,12 @@ const conf = convict({
135135
env: 'AWS_REGION',
136136
default: undefined
137137
},
138+
kmsEnabled: {
139+
doc: 'Enable AWS KMS for wallet management',
140+
format: Boolean,
141+
env: 'ENABLE_KMS',
142+
default: false
143+
},
138144
infuraKey: {
139145
doc: 'Infura API Key',
140146
format: '*',

0 commit comments

Comments
 (0)