Skip to content

Commit

Permalink
fix: Nns request converter "this is not a constructor" (#671)
Browse files Browse the repository at this point in the history
# Motivation

Fix mapping `Principal` in the Nns `request.converter`.

```
TypeError: this is not a constructor
    at fromText (chunk-GURPV5CO.js?v=adf4f374:738:23)
    at Array.map (<anonymous>)
    at Ui (@dfinity_nns.js?v=7b572303:2288:226)
    at er (@dfinity_nns.js?v=7b572303:2330:80)
    at cr (@dfinity_nns.js?v=7b572303:2433:115)
    at makeProposal (@dfinity_nns.js?v=7b572303:2753:16)
    at makeProposal (icp-proposal.api.ts:102:9)
    at async submitProposal (proposal.services.ts:108:22)
    at async submitProposal (submit.services.ts:432:34)
    at async HTMLFormElement.onSubmit (SubmitReview.svelte:45:19)
```

# Changes

- `Principal.fromText` cannot be used as a function when mapping an
array

# Screenshots

<img width="1536" alt="Capture d’écran 2024-07-07 à 18 46 56"
src="https://github.com/dfinity/ic-js/assets/16886711/43142b3e-5a22-4872-926f-a782703b3abc">

---------

Signed-off-by: David Dal Busco <[email protected]>
  • Loading branch information
peterpeterparker authored Jul 19, 2024
1 parent e82e30f commit 351291e
Show file tree
Hide file tree
Showing 2 changed files with 512 additions and 2 deletions.
Loading

0 comments on commit 351291e

Please sign in to comment.