-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '528-decouple-the-network-type-from-the-wallets-to-facil…
…itate-the-splitting-of-networks-within-their' into 'dev' Resolve "Decouple the network type from the wallets to facilitate the splitting of networks within their packages" Closes #528 See merge request ergo/rosen-bridge/ui!439
- Loading branch information
Showing
28 changed files
with
189 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@rosen-bridge/rosen-app': patch | ||
--- | ||
|
||
Decouple the network type from the wallets to enable the separation of networks within their packages, thereby improving code quality |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './wallet'; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { EtrnlWallet } from '@rosen-ui/eternl-wallet'; | ||
|
||
import { unwrap } from '@/_safeServerAction'; | ||
import { getTokenMap } from '@/_tokenMap/getClientTokenMap'; | ||
|
||
import { | ||
decodeWasmValue, | ||
generateLockAuxiliaryData, | ||
generateUnsignedTx, | ||
setTxWitnessSet, | ||
} from './server'; | ||
|
||
export const eternl = new EtrnlWallet({ | ||
getTokenMap, | ||
decodeWasmValue: unwrap(decodeWasmValue), | ||
generateLockAuxiliaryData: unwrap(generateLockAuxiliaryData), | ||
generateUnsignedTx: unwrap(generateUnsignedTx), | ||
setTxWitnessSet: unwrap(setTxWitnessSet), | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export * from './eternl'; | ||
export * from './lace'; | ||
export * from './metamask'; | ||
export * from './nami'; | ||
export * from './nautilus'; | ||
export * from './okx'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './wallet'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
'use server'; | ||
|
||
import { | ||
decodeWasmValue as decodeWasmValueCore, | ||
generateLockAuxiliaryData as generateLockAuxiliaryDataCore, | ||
generateUnsignedTx as generateUnsignedTxCore, | ||
setTxWitnessSet as setTxWitnessSetCore, | ||
} from '@rosen-network/cardano'; | ||
|
||
import { wrap } from '@/_safeServerAction'; | ||
import { getTokenMap } from '@/_tokenMap/getServerTokenMap'; | ||
|
||
export const decodeWasmValue = wrap(decodeWasmValueCore, { | ||
cache: Infinity, | ||
traceKey: 'decodeWasmValue', | ||
}); | ||
|
||
export const generateLockAuxiliaryData = wrap(generateLockAuxiliaryDataCore, { | ||
traceKey: 'generateLockAuxiliaryData', | ||
}); | ||
|
||
export const generateUnsignedTx = wrap(generateUnsignedTxCore(getTokenMap()), { | ||
traceKey: 'generateUnsignedTx', | ||
}); | ||
|
||
export const setTxWitnessSet = wrap(setTxWitnessSetCore, { | ||
traceKey: 'setTxWitnessSet', | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { LaceWallet } from '@rosen-ui/lace-wallet'; | ||
|
||
import { unwrap } from '@/_safeServerAction'; | ||
import { getTokenMap } from '@/_tokenMap/getClientTokenMap'; | ||
|
||
import { | ||
decodeWasmValue, | ||
generateLockAuxiliaryData, | ||
generateUnsignedTx, | ||
setTxWitnessSet, | ||
} from './server'; | ||
|
||
export const lace = new LaceWallet({ | ||
getTokenMap, | ||
decodeWasmValue: unwrap(decodeWasmValue), | ||
generateLockAuxiliaryData: unwrap(generateLockAuxiliaryData), | ||
generateUnsignedTx: unwrap(generateUnsignedTx), | ||
setTxWitnessSet: unwrap(setTxWitnessSet), | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './wallet'; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { MetaMaskWallet } from '@rosen-ui/metamask-wallet'; | ||
|
||
import { unwrap } from '@/_safeServerAction'; | ||
import { getTokenMap } from '@/_tokenMap/getClientTokenMap'; | ||
|
||
import { generateLockData, generateTxParameters } from './server'; | ||
|
||
export const metamask = new MetaMaskWallet({ | ||
getTokenMap, | ||
generateLockData: unwrap(generateLockData), | ||
generateTxParameters: unwrap(generateTxParameters), | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './wallet'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
'use server'; | ||
|
||
import { | ||
decodeWasmValue as decodeWasmValueCore, | ||
generateLockAuxiliaryData as generateLockAuxiliaryDataCore, | ||
generateUnsignedTx as generateUnsignedTxCore, | ||
setTxWitnessSet as setTxWitnessSetCore, | ||
} from '@rosen-network/cardano'; | ||
|
||
import { wrap } from '@/_safeServerAction'; | ||
import { getTokenMap } from '@/_tokenMap/getServerTokenMap'; | ||
|
||
export const decodeWasmValue = wrap(decodeWasmValueCore, { | ||
cache: Infinity, | ||
traceKey: 'decodeWasmValue', | ||
}); | ||
|
||
export const generateLockAuxiliaryData = wrap(generateLockAuxiliaryDataCore, { | ||
traceKey: 'generateLockAuxiliaryData', | ||
}); | ||
|
||
export const generateUnsignedTx = wrap(generateUnsignedTxCore(getTokenMap()), { | ||
traceKey: 'generateUnsignedTx', | ||
}); | ||
|
||
export const setTxWitnessSet = wrap(setTxWitnessSetCore, { | ||
traceKey: 'setTxWitnessSet', | ||
}); |
Oops, something went wrong.