Skip to content

Commit

Permalink
Deprecated function UmarshallPB
Browse files Browse the repository at this point in the history
* Deprecated function in favor of UnmarshallPB
* Added console.warn in order to warn about the deprecated function
  • Loading branch information
eduardonunesp authored and enlight committed Jan 24, 2019
1 parent e73df9c commit 37dd907
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/address.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,15 @@ export class Address {
return this.chainId === other.chainId && this.local.equals(other.local)
}

/**
* @deprecated Use the function UnmarshalPB instead
*/
static UmarshalPB(pb: pb.Address): Address {
console.warn('Function UmarshalPB is deprecated and should be replaced by UnmarshalPB')
return Address.UnmarshalPB(pb)
}

static UnmarshalPB(pb: pb.Address): Address {
return new Address(pb.getChainId(), new LocalAddress(pb.getLocal_asU8()))
}

Expand Down

0 comments on commit 37dd907

Please sign in to comment.