Skip to content

Commit 6a8f5a7

Browse files
committed
Remove deprecated Nami wallet; Fix e2e tests
1 parent 53f42ed commit 6a8f5a7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+158
-265
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,7 @@ You can also access [PureScript documentation for CTL and its dependencies](http
6464
- [`cardano-serialization-lib`](https://github.com/Emurgo/cardano-serialization-lib/)
6565
- [Ogmios](https://ogmios.dev) for chain queries
6666
- [Kupo](https://cardanosolutions.github.io/kupo/) for chain queries
67-
- [CIP-30](https://github.com/cardano-foundation/CIPs/tree/master/CIP-0030) (wallet interface - Nami partially implements this)
68-
- [Nami docs](https://github.com/Berry-Pool/nami-wallet)
67+
- [CIP-30](https://github.com/cardano-foundation/CIPs/tree/master/CIP-0030) (wallet interface)
6968
- [Alonzo CDDL spec](https://github.com/input-output-hk/cardano-ledger/blob/0738804155245062f05e2f355fadd1d16f04cd56/alonzo/impl/cddl-files/alonzo.cddl)
7069

7170
## Available support channels info

doc/e2e-testing.md

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ For purposes of testing, there are two parts to using a wallet: providing the ri
6565
### Where to Find the Installed Extensions
6666

6767
1. Locate your browser profile directory. Commonly used locations include: `~/.config/{google-chrome,chromium}/Default` (where `Default` is the profile name), `~/snap/chromium/common/chromium/Default`.
68-
2. Make sure that inside the profile, your desired extension is unpacked. Nami should be in `Extensions/lpfcbjknijpeeillifnkikgncikgfhdo`, Gero (testnet version) in `Extensions/iifeegfcfhlhhnilhfoeihllenamcfgc`.
68+
2. Make sure that inside the profile, your desired extension is unpacked. Gero (testnet version) should be in `Extensions/iifeegfcfhlhhnilhfoeihllenamcfgc`.
6969
3. Add the version as a subdirectory, too. The final path may look like `/home/user/.config/google-chrome/Default/Extensions/iifeegfcfhlhhnilhfoeihllenamcfgc/1.10.9_0`
7070

7171
### How to Use a Different User Wallet
@@ -125,10 +125,6 @@ The tests can set up using CLI arguments, environment variables, or both. CLI ar
125125
| Lode CRX URL | `--lode-crx-url` | `LODE_CRX_URL` |
126126
| Lode password | `--lode-password` | `LODE_PASSWORD` |
127127
| Lode Extension ID | `--lode-extid` | `LODE_EXTID` |
128-
| Nami CRX URL | `--nami-crx-url` | `NAMI_CRX_URL` |
129-
| Nami CRX file | `--nami-crx` | `NAMI_CRX` |
130-
| Nami password | `--nami-password` | `NAMI_PASSWORD` |
131-
| Nami Extension ID | `--nami-extid` | `NAMI_EXTID` |
132128
| Flint CRX URL | `--flint-crx-url` | `FLINT_CRX_URL` |
133129
| Flint CRX file | `--flint-crx` | `FLINT_CRX` |
134130
| Flint password | `--flint-password` | `FLINT_PASSWORD` |
@@ -231,12 +227,10 @@ main = do
231227
232228
configs :: Map E2EConfigName (ContractParams /\ Maybe WalletMock)
233229
configs = Map.fromFoldable
234-
[ "nami" /\ testnetNamiConfig /\ Nothing
235-
, "gero" /\ testnetGeroConfig /\ Nothing
230+
[ "gero" /\ testnetGeroConfig /\ Nothing
236231
, "flint" /\ testnetFlintConfig /\ Nothing
237232
, "eternl" /\ testnetEternlConfig /\ Nothing
238233
, "lode" /\ testnetLodeConfig /\ Nothing
239-
, "nami-mock" /\ testnetNamiConfig /\ Just MockNami
240234
, "gero-mock" /\ testnetGeroConfig /\ Just MockGero
241235
, "flint-mock" /\ testnetFlintConfig /\ Just MockFlint
242236
, "lode-mock" /\ testnetLodeConfig /\ Just MockLode
@@ -300,15 +294,14 @@ It's possible to run headless browser tests on top of a Cardano Testnet cluster.
300294
To do that, it's enough to define a config name that:
301295

302296
- uses a `ContractParams` value with `networkId` set to `MainnetId`.
303-
- Specifies a wallet mock (e.g. `MockNami`)
297+
- Specifies a wallet mock (e.g. `MockGero`)
304298

305299
E.g.:
306300

307301
```purescript
308302
wallets :: Map E2EConfigName (ContractParams /\ Maybe WalletMock)
309303
wallets = Map.fromFoldable
310-
[ "testnet-nami-mock" /\ mainnetNamiConfig /\ Just MockNami
311-
, "testnet-gero-mock" /\ mainnetGeroConfig /\ Just MockGero
304+
[ "testnet-gero-mock" /\ mainnetGeroConfig /\ Just MockGero
312305
, "testnet-flint-mock" /\ mainnetFlintConfig /\ Just MockFlint
313306
, "testnet-lode-mock" /\ mainnetLodeConfig /\ Just MockLode
314307
]

doc/getting-started.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,17 @@ main = Contract.Monad.launchAff_ do -- we re-export this for you
106106
Then use the eliminator `Contract.Monad.runContract` with a config specifying network and wallet:
107107

108108
```purescript
109+
110+
testnetEternlConfig :: Contract.Monad.ContractParams
111+
testnetEternlConfig =
112+
Contract.Config.testnetConfig
113+
{ walletSpec =
114+
Just $ ConnectToGenericCip30 (walletName Eternl) { cip95: false }
115+
}
116+
109117
main :: Effect Unit
110118
main = Contract.Monad.launchAff_ do
111-
runContract Contract.Config.testnetNamiConfig do
119+
runContract testnetEternlConfig do
112120
...
113121
```
114122

@@ -135,7 +143,7 @@ main = Contract.Monad.launchAff_ do -- we re-export this for you
135143
, kupoConfig: defaultKupoServerConfig
136144
}
137145
, networkId: TestnetId
138-
, walletSpec: Just ConnectToNami
146+
, walletSpec: Just $ ConnectToGenericCip30 (walletName Eternl) { cip95: false }
139147
, logLevel: Trace
140148
, customLogger: Nothing
141149
, suppressLogs: false

examples/AdditionalUtxos.purs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import Contract.BalanceTxConstraints
3030
)
3131
import Contract.Config
3232
( ContractParams
33-
, KnownWallet(Nami)
33+
, KnownWallet(Eternl)
3434
, WalletSpec(ConnectToGenericCip30)
3535
, testnetConfig
3636
, walletName
@@ -61,7 +61,7 @@ import Test.QuickCheck.Gen (randomSampleOne)
6161
main :: Effect Unit
6262
main = example $ testnetConfig
6363
{ walletSpec =
64-
Just $ ConnectToGenericCip30 (walletName Nami) { cip95: false }
64+
Just $ ConnectToGenericCip30 (walletName Eternl) { cip95: false }
6565
}
6666

6767
example :: ContractParams -> Effect Unit

examples/AlwaysMints.purs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import Cardano.Types.RedeemerDatum as RedeemerDatum
2323
import Cardano.Types.Transaction as Transaction
2424
import Contract.Config
2525
( ContractParams
26-
, KnownWallet(Nami)
26+
, KnownWallet(Eternl)
2727
, WalletSpec(ConnectToGenericCip30)
2828
, testnetConfig
2929
, walletName
@@ -38,7 +38,7 @@ import Data.Map as Map
3838
main :: Effect Unit
3939
main = example $ testnetConfig
4040
{ walletSpec =
41-
Just $ ConnectToGenericCip30 (walletName Nami) { cip95: false }
41+
Just $ ConnectToGenericCip30 (walletName Eternl) { cip95: false }
4242
}
4343

4444
contract :: Contract Unit

examples/AlwaysSucceeds.purs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ import Cardano.Types.TransactionUnspentOutput (toUtxoMap)
3838
import Contract.Address (mkAddress)
3939
import Contract.Config
4040
( ContractParams
41-
, KnownWallet(Nami)
41+
, KnownWallet(Eternl)
4242
, WalletSpec(ConnectToGenericCip30)
4343
, testnetConfig
4444
, walletName
@@ -62,7 +62,7 @@ import Effect.Exception (error)
6262
main :: Effect Unit
6363
main = example $ testnetConfig
6464
{ walletSpec =
65-
Just $ ConnectToGenericCip30 (walletName Nami) { cip95: false }
65+
Just $ ConnectToGenericCip30 (walletName Eternl) { cip95: false }
6666
}
6767

6868
contract :: Contract Unit

examples/AwaitTxConfirmedWithTimeout.purs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import Contract.Prelude
1313
import Cardano.AsCbor (decodeCbor)
1414
import Contract.Config
1515
( ContractParams
16-
, KnownWallet(Nami)
16+
, KnownWallet(Eternl)
1717
, WalletSpec(ConnectToGenericCip30)
1818
, testnetConfig
1919
, walletName
@@ -28,7 +28,7 @@ import Partial.Unsafe (unsafePartial)
2828
main :: Effect Unit
2929
main = example $ testnetConfig
3030
{ walletSpec =
31-
Just $ ConnectToGenericCip30 (walletName Nami) { cip95: false }
31+
Just $ ConnectToGenericCip30 (walletName Eternl) { cip95: false }
3232
}
3333

3434
example :: ContractParams -> Effect Unit

examples/ByUrl.purs

Lines changed: 8 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@ import Prelude
44

55
import Contract.Config
66
( ContractParams
7-
, KnownWallet(Nami, Gero, Flint, Eternl, Lode, Lace, NuFi)
7+
, KnownWallet(Gero, Flint, Eternl, Lode, Lace, NuFi)
88
, WalletSpec(ConnectToGenericCip30)
99
, blockfrostPublicPreprodServerConfig
1010
, blockfrostPublicPreviewServerConfig
11-
, mainnetConfig
1211
, mkBlockfrostBackendParams
1312
, testnetConfig
1413
, walletName
@@ -65,11 +64,7 @@ main = do
6564
if isNothing mbApiKey then Map.empty
6665
else
6766
Map.fromFoldable
68-
[ "blockfrost-nami-preview"
69-
/\ (mkBlockfrostPreviewConfig mbApiKey)
70-
{ walletSpec = connectTo Nami }
71-
/\ Nothing
72-
, "blockfrost-gero-preview"
67+
[ "blockfrost-gero-preview"
7368
/\ (mkBlockfrostPreviewConfig mbApiKey)
7469
{ walletSpec = connectTo Gero }
7570
/\ Nothing
@@ -93,10 +88,6 @@ main = do
9388
/\ (mkBlockfrostPreviewConfig mbApiKey)
9489
{ walletSpec = connectTo Lace }
9590
/\ Nothing
96-
, "blockfrost-nami-preprod"
97-
/\ (mkBlockfrostPreprodConfig mbApiKey)
98-
{ walletSpec = connectTo Nami }
99-
/\ Nothing
10091
, "blockfrost-gero-preprod"
10192
/\ (mkBlockfrostPreprodConfig mbApiKey)
10293
{ walletSpec = connectTo Gero }
@@ -138,23 +129,20 @@ getBlockfrostApiKey = do
138129

139130
wallets :: Map E2EConfigName (ContractParams /\ Maybe String)
140131
wallets = map (map walletName) <$> Map.fromFoldable
141-
[ "nami" /\ testnetConfig' Nami /\ Nothing
142-
, "gero" /\ testnetConfig' Gero /\ Nothing
132+
[ "gero" /\ testnetConfig' Gero /\ Nothing
143133
, "flint" /\ testnetConfig' Flint /\ Nothing
144134
, "eternl" /\ testnetConfig' Eternl /\ Nothing
145135
, "lode" /\ testnetConfig' Lode /\ Nothing
146136
, "nufi" /\ testnetConfig' NuFi /\ Nothing
147137
, "lace" /\ testnetConfig' Lace /\ Nothing
148-
, "nami-mainnet" /\ mainnetNamiConfig /\ Nothing
149-
, "nami-mock" /\ testnetConfig' Nami /\ Just Nami
150138
, "gero-mock" /\ testnetConfig' Gero /\ Just Gero
151139
, "flint-mock" /\ testnetConfig' Flint /\ Just Flint
152140
, "lode-mock" /\ testnetConfig' Lode /\ Just Lode
153-
, "plutip-nami-mock" /\ testnetConfig' Nami /\ Just Nami
154-
, "plutip-gero-mock" /\ testnetConfig' Gero /\ Just Gero
155-
, "plutip-flint-mock" /\ testnetConfig' Flint /\ Just Flint
156-
, "plutip-lode-mock" /\ testnetConfig' Lode /\ Just Lode
157-
, "plutip-nufi-mock" /\ testnetConfig' NuFi /\ Just NuFi
141+
, "localnet-eternl-mock" /\ testnetConfig' Eternl /\ Just Eternl
142+
, "localnet-gero-mock" /\ testnetConfig' Gero /\ Just Gero
143+
, "localnet-flint-mock" /\ testnetConfig' Flint /\ Just Flint
144+
, "localnet-lode-mock" /\ testnetConfig' Lode /\ Just Lode
145+
, "localnet-nufi-mock" /\ testnetConfig' NuFi /\ Just NuFi
158146
]
159147
where
160148
testnetConfig' :: KnownWallet -> ContractParams
@@ -164,13 +152,6 @@ wallets = map (map walletName) <$> Map.fromFoldable
164152
Just $ ConnectToGenericCip30 (walletName wallet) { cip95: false }
165153
}
166154

167-
mainnetNamiConfig :: ContractParams
168-
mainnetNamiConfig =
169-
mainnetConfig
170-
{ walletSpec =
171-
Just $ ConnectToGenericCip30 (walletName Nami) { cip95: false }
172-
}
173-
174155
mkBlockfrostPreviewConfig :: Maybe String -> ContractParams
175156
mkBlockfrostPreviewConfig apiKey =
176157
testnetConfig

examples/Cip30.purs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import Cardano.Wallet.Cip30
1717
import Cardano.Wallet.Cip30.TypeSafe as Cip30
1818
import Contract.Config
1919
( ContractParams
20-
, KnownWallet(Nami)
20+
, KnownWallet(Eternl)
2121
, WalletSpec(ConnectToGenericCip30)
2222
, testnetConfig
2323
, walletName
@@ -38,7 +38,7 @@ import Effect.Exception (error)
3838
main :: Effect Unit
3939
main = example $ testnetConfig
4040
{ walletSpec =
41-
Just $ ConnectToGenericCip30 (walletName Nami) { cip95: false }
41+
Just $ ConnectToGenericCip30 (walletName Eternl) { cip95: false }
4242
}
4343

4444
example :: ContractParams -> Effect Unit

examples/DropTokens.purs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import Cardano.Types.MultiAsset as MultiAsset
88
import Cardano.Types.Value as Value
99
import Contract.Config
1010
( ContractParams
11-
, KnownWallet(Nami)
11+
, KnownWallet(Eternl)
1212
, WalletSpec(ConnectToGenericCip30)
1313
, testnetConfig
1414
, walletName
@@ -28,7 +28,7 @@ import Test.Ctl.Fixtures (nullPaymentPubKeyHash)
2828
main :: Effect Unit
2929
main = example $ testnetConfig
3030
{ walletSpec =
31-
Just $ ConnectToGenericCip30 (walletName Nami) { cip95: false }
31+
Just $ ConnectToGenericCip30 (walletName Eternl) { cip95: false }
3232
}
3333

3434
example :: ContractParams -> Effect Unit

0 commit comments

Comments
 (0)