Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions modules/key-card/src/generateQrData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,8 @@ function generateBitGoQrData(bitgoKeychain: Keychain): QrDataEntry {
assert.ok(bitgoData);

return {
title: 'C: BitGo Public Key',
description:
'This is the public part of the key that BitGo will use to ' + 'co-sign transactions\r\nwith you on your wallet.',
title: 'C: BitGo Key',
description: 'This is the public part of the key held by BitGo.',
data: bitgoData,
};
}
Expand All @@ -132,7 +131,7 @@ function generateUserMasterPublicKeyQRData(publicKey: string): MasterPublicKeyQr
function generatePasscodeQrData(passphrase: string, passcodeEncryptionCode: string): QrDataEntry {
const encryptedWalletPasscode = encrypt(passcodeEncryptionCode, passphrase);
return {
title: 'D: Encrypted wallet Password',
title: 'D: Encrypted Wallet Password',
description: 'This is the wallet password, encrypted client-side with a key held by BitGo.',
data: encryptedWalletPasscode,
};
Expand All @@ -145,7 +144,7 @@ async function generatePasscodeQrDataAsync(
): Promise<QrDataEntry> {
const encryptedWalletPasscode = await encryptAsync(passcodeEncryptionCode, passphrase, { encryptionVersion });
return {
title: 'D: Encrypted wallet Password',
title: 'D: Encrypted Wallet Password',
description: 'This is the wallet password, encrypted client-side with a key held by BitGo.',
data: encryptedWalletPasscode,
};
Expand Down
10 changes: 4 additions & 6 deletions modules/key-card/test/unit/generateQrData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,12 @@ describe('generateQrData', function () {
qrData.backup.data.should.equal(backupEncryptedPrv);

assert.ok(qrData.bitgo);
qrData.bitgo.title.should.equal('C: BitGo Public Key');
qrData.bitgo.description.should.equal(
'This is the public part of the key that BitGo will use to ' + 'co-sign transactions\r\nwith you on your wallet.'
);
qrData.bitgo.title.should.equal('C: BitGo Key');
qrData.bitgo.description.should.equal('This is the public part of the key held by BitGo.');
qrData.bitgo.data.should.equal(bitgoPub);

assert.ok(qrData.passcode);
qrData.passcode.title.should.equal('D: Encrypted wallet Password');
qrData.passcode.title.should.equal('D: Encrypted Wallet Password');
qrData.passcode.description.should.equal(
'This is the wallet password, encrypted client-side with a key held by BitGo.'
);
Expand Down Expand Up @@ -163,7 +161,7 @@ describe('generateQrData', function () {
should.not.exist(qrData.bitgo);

assert.ok(qrData.passcode);
qrData.passcode.title.should.equal('D: Encrypted wallet Password');
qrData.passcode.title.should.equal('D: Encrypted Wallet Password');
const decryptedData = decrypt(passcodeEncryptionCode, qrData.passcode.data);
decryptedData.should.equal(passphrase);
});
Expand Down
8 changes: 3 additions & 5 deletions modules/sdk-core/src/bitgo/internal/keycard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,15 +126,13 @@ function buildKeycardQrData(options: BuildKeycardQrDataOptions, encryptedWalletP
data: backupKeychain.encryptedPrv,
},
bitgo: {
title: 'C: BitGo Public Key',
desc:
'This is the public part of the key that BitGo will use to ' +
'co-sign transactions\r\nwith you on your wallet.',
title: 'C: BitGo Key',
desc: 'This is the public part of the key held by BitGo.',
data: bitgoKeychain.pub,
},
passcode: {
title: 'D: Encrypted Wallet Password',
desc: 'This is the wallet password, encrypted client-side ' + 'with a key held by\r\nBitGo.',
desc: 'This is the wallet password, encrypted client-side ' + 'with a key held by\r\nBitGo.',
data: encryptedWalletPasscode,
},
};
Expand Down
Loading