Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to SerLib 11 (Babbage) #2914

Merged
merged 15 commits into from
Aug 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/yoroi-ergo-connector/example-cardano/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"start": "webpack-dev-server"
},
"devDependencies": {
"@emurgo/cardano-serialization-lib-browser": "10.2.0",
"@emurgo/cardano-serialization-lib-browser": "11.0.0",
"webpack": "^4.29.3",
"webpack-cli": "^3.1.0",
"webpack-dev-server": "^3.1.5",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ describe('takeUtxosForValues', () => {
// The third utxo is taken then
const take2 = CoinSelection.takeUtxosForValues(
[utxos[2], utxos[0], utxos[1]],
[multiToken(1_990_000)],
[multiToken(2_990_000)],
createCoinsPerUtxoWord(30_000),
0,
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1042,7 +1042,9 @@ function newAdaUnsignedTxFromUtxoForConnector(
txBuilder.set_collateral(collateralBuilder);
// script data hash
txBuilder.calc_script_data_hash(
RustModule.WalletV4.TxBuilderConstants.plutus_default_cost_models(),
protocolParams.networkId > 0 ?
RustModule.WalletV4.TxBuilderConstants.plutus_vasil_cost_models()
: RustModule.WalletV4.TxBuilderConstants.plutus_default_cost_models(),
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -493,8 +493,8 @@ describe('Create unsigned TX from UTXO', () => {
// it will take only one of the utxos because it covers the required token and the fee
expect(unsignedTxResponse.senderUtxos).toEqual([utxos[4], utxos[2]]);
expect(unsignedTxResponse.txBuilder.get_explicit_input().coin().to_str()).toEqual('12000002');
expect(unsignedTxResponse.txBuilder.get_explicit_output().coin().to_str()).toEqual('11998056');
expect(unsignedTxResponse.txBuilder.min_fee().to_str()).toEqual('1946');
expect(unsignedTxResponse.txBuilder.get_explicit_output().coin().to_str()).toEqual('11998058');
expect(unsignedTxResponse.txBuilder.min_fee().to_str()).toEqual('1944');

const assetInfo = identifierToCardanoAsset(testAssetId);
expect(unsignedTxResponse.txBuilder.get_explicit_input().multiasset()
Expand Down
13 changes: 13 additions & 0 deletions packages/yoroi-extension/app/api/common/errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,10 @@ const messages = defineMessages({
id: 'api.errors.checkAdressesInUseApiError',
defaultMessage: '!!!Error received from server while checking used addresses.',
},
getMultiAssetMintMetadataApiError: {
id: 'api.errors.getMultiAssetMintMetadataApiError',
defaultMessage: '!!!Error received from server while querying minting metadata.',
},
assetInfoApiError: {
id: 'api.errors.assetInfoApiError',
defaultMessage: '!!!Error received from server while getting asset info.',
Expand Down Expand Up @@ -439,6 +443,15 @@ export class CheckAddressesInUseApiError extends LocalizableError {
}
}

export class GetMultiAssetMintMetadataApiError extends LocalizableError {
constructor() {
super({
id: messages.getMultiAssetMintMetadataApiError.id,
defaultMessage: messages.getMultiAssetMintMetadataApiError.defaultMessage || '',
});
}
}

export class GetAssetInfoApiError extends LocalizableError {
constructor() {
super({
Expand Down
12 changes: 6 additions & 6 deletions packages/yoroi-extension/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/yoroi-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
"@babel/runtime": "7.12.18",
"@babel/runtime-corejs3": "7.12.18",
"@emurgo/cardano-message-signing-nodejs": "1.0.1",
"@emurgo/cardano-serialization-lib-nodejs": "10.2.0",
"@emurgo/cardano-serialization-lib-nodejs": "11.0.0",
"@emurgo/js-chain-libs-node": "0.7.1",
"@pmmmwh/react-refresh-webpack-plugin": "0.4.3",
"@storybook/addon-actions": "6.2.7",
Expand Down Expand Up @@ -179,7 +179,7 @@
"@emotion/react": "^11.4.1",
"@emotion/styled": "^11.3.0",
"@emurgo/cardano-message-signing-browser": "1.0.1",
"@emurgo/cardano-serialization-lib-browser": "10.2.0",
"@emurgo/cardano-serialization-lib-browser": "11.0.0",
"@emurgo/cip14-js": "2.0.0",
"@emurgo/cip4-js": "1.0.5",
"@emurgo/js-chain-libs": "0.7.1",
Expand Down