fix: pretty print PublicKey objects in node and in the browser (#29062)
This commit is contained in:
parent
ecea802fe6
commit
ffcebbbd9b
|
@ -129,6 +129,10 @@ export class PublicKey extends Struct {
|
|||
return zeroPad;
|
||||
}
|
||||
|
||||
get [Symbol.toStringTag](): string {
|
||||
return `PublicKey(${this.toString()})`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the base-58 representation of the public key
|
||||
*/
|
||||
|
|
|
@ -4518,7 +4518,8 @@ describe('Connection', function () {
|
|||
|
||||
expect(largestAccounts).to.have.length(2);
|
||||
const largestAccount = largestAccounts[0];
|
||||
expect(largestAccount.address).to.eql(testTokenAccountPubkey);
|
||||
expect(largestAccount.address.equals(testTokenAccountPubkey)).to.be
|
||||
.true;
|
||||
expect(largestAccount.amount).to.eq('11110');
|
||||
expect(largestAccount.decimals).to.eq(2);
|
||||
expect(largestAccount.uiAmount).to.eq(111.1);
|
||||
|
|
Loading…
Reference in New Issue