You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The client maintains a gRPC channel, plus one in its referenced IAM client. close() should be called on the client when it's no longer needed.
The logical lifetime of the client is that of the GcpKmsSigner. I suggest changing it to instantiate the KeyManagementServiceClient, and pass that to the util methods.
The text was updated successfully, but these errors were encountered:
Alternatively, since GcpKmsSigner doesn't take the Google credentials, the KeyManagementServiceClient could be made a singleton field in the utils for now. At least that would reduce leakage to just that instance and its channels.
In
src/util/gcp-kms-utils.ts
it instantiates a newKeyManagementServiceClient
each timesign
orgetPublicKey
is called.See:
ethers-gcp-kms-signer/src/util/gcp-kms-utils.ts
Line 25 in 45a5186
ethers-gcp-kms-signer/src/util/gcp-kms-utils.ts
Line 43 in 45a5186
The client maintains a gRPC channel, plus one in its referenced IAM client.
close()
should be called on the client when it's no longer needed.The logical lifetime of the client is that of the
GcpKmsSigner
. I suggest changing it to instantiate theKeyManagementServiceClient
, and pass that to the util methods.The text was updated successfully, but these errors were encountered: