Skip to content

Commit

Permalink
cleanup old functions from base (#228)
Browse files Browse the repository at this point in the history
### Description

these have been either marked deprecated for ages and or are just
completely out of scope for the type of functions we should be
supporting.

### Other changes

nope.

### Tested

seem unused internally

### Related issues


### Backwards compatibility

nope / removing things
### Documentation

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on removing deprecated functions and constants from
various modules in the `sdk` package, specifically related to
`contacts`, `displayFormatting`, `currencies`, and `phoneNumbers`. It
also introduces new claim types and metadata handling in the
`metadata-claims` module.

### Detailed summary
- Removed deprecated functions and constants from:
  - `contacts`
  - `displayFormatting`
  - `currencies`
  - `phoneNumbers`
- Introduced new claim types in `metadata-claims`:
  - `AccountClaimType`
  - `KeybaseClaimType`
  - `DomainClaimType`
  - `NameClaimType`
  - `StorageClaimType`
- Enhanced `IdentityMetadataWrapper` for improved metadata handling.
- Updated documentation to reflect removed exports and new structures.

> The following files were skipped due to too many changes:
`packages/sdk/metadata-claims/lib/metadata.js`

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`

<!-- end pr-codex -->
  • Loading branch information
aaronmgdr authored Oct 2, 2024
1 parent 33ad4aa commit 4ef76eb
Show file tree
Hide file tree
Showing 55 changed files with 893 additions and 1,021 deletions.
17 changes: 17 additions & 0 deletions .changeset/rude-parrots-know.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
'@celo/base': major
'@celo/utils': major
---

remove deprecated functions and consts exported from ./contacts and ./displayformating. ./currencies and ./phonenumbers. If these are used by your app we recommend to inline the functions from the previous release.

* https://github.com/celo-org/developer-tooling/blob/%40celo/wallet-base%406.0.1/packages/sdk/base/src/contacts.ts
* https://github.com/celo-org/developer-tooling/blob/%40celo/wallet-base%406.0.1/packages/sdk/base/src/displayFormatting.ts
* https://github.com/celo-org/developer-tooling/blob/%40celo/wallet-base%406.0.1/packages/sdk/base/src/phoneNumbers.ts

https://github.com/celo-org/developer-tooling/tree/%40celo/wallet-base%406.0.1/packages/sdk/base/src

Full List of removed exports -- ContactPhoneNumber, MinimalContact, getContactPhoneNumber, isContact, CURRENCY_ENUM, Currency, CURRENCIES, resolveCurrency, SHORT_CURRENCIES, currencyToShortMap | getErrorMessage | anonymizedPhone | getContactNameHash



2 changes: 0 additions & 2 deletions docs/sdk/base/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
- [address](modules/address.md)
- [async](modules/async.md)
- [collections](modules/collections.md)
- [contacts](modules/contacts.md)
- [currencies](modules/currencies.md)
- [displayFormatting](modules/displayFormatting.md)
- [future](modules/future.md)
- [index](modules/index.md)
- [inputValidation](modules/inputValidation.md)
Expand Down
47 changes: 0 additions & 47 deletions docs/sdk/base/enums/currencies.CURRENCY_ENUM.md

This file was deleted.

47 changes: 0 additions & 47 deletions docs/sdk/base/enums/currencies.SHORT_CURRENCIES.md

This file was deleted.

6 changes: 3 additions & 3 deletions docs/sdk/base/enums/currencies.StableToken.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#### Defined in

[packages/sdk/base/src/currencies.ts:10](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/currencies.ts#L10)
[packages/sdk/base/src/currencies.ts:3](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/currencies.ts#L3)

___

Expand All @@ -30,7 +30,7 @@ ___

#### Defined in

[packages/sdk/base/src/currencies.ts:11](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/currencies.ts#L11)
[packages/sdk/base/src/currencies.ts:4](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/currencies.ts#L4)

___

Expand All @@ -40,4 +40,4 @@ ___

#### Defined in

[packages/sdk/base/src/currencies.ts:9](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/currencies.ts#L9)
[packages/sdk/base/src/currencies.ts:2](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/currencies.ts#L2)
2 changes: 1 addition & 1 deletion docs/sdk/base/enums/currencies.Token.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@

#### Defined in

[packages/sdk/base/src/currencies.ts:15](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/currencies.ts#L15)
[packages/sdk/base/src/currencies.ts:8](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/currencies.ts#L8)
32 changes: 0 additions & 32 deletions docs/sdk/base/interfaces/contacts.ContactPhoneNumber.md

This file was deleted.

54 changes: 0 additions & 54 deletions docs/sdk/base/interfaces/contacts.MinimalContact.md

This file was deleted.

55 changes: 0 additions & 55 deletions docs/sdk/base/modules/contacts.md

This file was deleted.

67 changes: 1 addition & 66 deletions docs/sdk/base/modules/currencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,13 @@

### Enumerations

- [CURRENCY\_ENUM](../enums/currencies.CURRENCY_ENUM.md)
- [SHORT\_CURRENCIES](../enums/currencies.SHORT_CURRENCIES.md)
- [StableToken](../enums/currencies.StableToken.md)
- [Token](../enums/currencies.Token.md)

### Type Aliases

- [CeloTokenType](currencies.md#celotokentype)

### Variables

- [CURRENCIES](currencies.md#currencies)
- [currencyToShortMap](currencies.md#currencytoshortmap)

### Functions

- [resolveCurrency](currencies.md#resolvecurrency)

## Type Aliases

### CeloTokenType
Expand All @@ -32,58 +21,4 @@

#### Defined in

[packages/sdk/base/src/currencies.ts:18](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/currencies.ts#L18)

## Variables

### CURRENCIES

`Const` **CURRENCIES**: `CurrencyObject`

**`Deprecated`**

#### Defined in

[packages/sdk/base/src/currencies.ts:29](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/currencies.ts#L29)

___

### currencyToShortMap

`Const` **currencyToShortMap**: `Object`

**`Deprecated`**

use StableToken and Token

#### Type declaration

| Name | Type |
| :------ | :------ |
| `Celo Dollar` | [`SHORT_CURRENCIES`](../enums/currencies.SHORT_CURRENCIES.md) |
| `Celo Euro` | [`SHORT_CURRENCIES`](../enums/currencies.SHORT_CURRENCIES.md) |
| `Celo Gold` | [`SHORT_CURRENCIES`](../enums/currencies.SHORT_CURRENCIES.md) |

#### Defined in

[packages/sdk/base/src/currencies.ts:68](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/currencies.ts#L68)

## Functions

### resolveCurrency

**resolveCurrency**(`label`): [`CURRENCY_ENUM`](../enums/currencies.CURRENCY_ENUM.md)

#### Parameters

| Name | Type |
| :------ | :------ |
| `label` | `string` |

#### Returns

[`CURRENCY_ENUM`](../enums/currencies.CURRENCY_ENUM.md)

#### Defined in

[packages/sdk/base/src/currencies.ts:47](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/currencies.ts#L47)
[packages/sdk/base/src/currencies.ts:11](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/currencies.ts#L11)
Loading

0 comments on commit 4ef76eb

Please sign in to comment.