Skip to content

Commit

Permalink
feat(sdk-coin-ada): incorporate sdk-coin-ada back into bitgo
Browse files Browse the repository at this point in the history
Ticket: BG-53173
  • Loading branch information
margueriteblair committed Jul 27, 2022
1 parent 525efab commit 99d141b
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions modules/bitgo/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ module.exports = function (config) {
'dist/browser/BitGoJS.min.js',
'test/browser/karmaHelper.js',
{ pattern: 'test/browser/**/*.ts' },
{ pattern: 'dist/browser/*.wasm', included: false, served: true, watched: false, nocache: true },
],

plugins: [
Expand Down
1 change: 1 addition & 0 deletions modules/bitgo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"@bitgo/account-lib": "^2.20.0",
"@bitgo/blockapis": "^1.0.4",
"@bitgo/sdk-api": "^1.1.0",
"@bitgo/sdk-coin-ada": "^1.1.0",
"@bitgo/sdk-coin-algo": "^1.1.0",
"@bitgo/sdk-coin-avaxc": "^1.1.0",
"@bitgo/sdk-coin-avaxp": "^2.0.0",
Expand Down
4 changes: 4 additions & 0 deletions modules/bitgo/src/v2/coinFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { CoinFactory } from '@bitgo/sdk-core';
import { AlgoToken } from '@bitgo/sdk-coin-algo';
import { Bcha, Tbcha } from '@bitgo/sdk-coin-bcha';
import {
Ada,
Algo,
AvaxC,
AvaxCToken,
Expand Down Expand Up @@ -42,6 +43,7 @@ import {
Susd,
Talgo,
TavaxC,
Tada,
TavaxP,
Tbch,
Tbsc,
Expand Down Expand Up @@ -83,6 +85,7 @@ import { SolToken } from '@bitgo/sdk-coin-sol';
import { HbarToken } from '@bitgo/sdk-coin-hbar';

function registerCoinConstructors(globalCoinFactory: CoinFactory): void {
globalCoinFactory.register('ada', Ada.createInstance);
globalCoinFactory.register('algo', Algo.createInstance);
globalCoinFactory.register('avaxc', AvaxC.createInstance);
globalCoinFactory.register('avaxp', AvaxP.createInstance);
Expand Down Expand Up @@ -115,6 +118,7 @@ function registerCoinConstructors(globalCoinFactory: CoinFactory): void {
globalCoinFactory.register('stx', Stx.createInstance);
globalCoinFactory.register('susd', Susd.createInstance);
globalCoinFactory.register('talgo', Talgo.createInstance);
globalCoinFactory.register('tada', Tada.createInstance);
globalCoinFactory.register('tavaxc', TavaxC.createInstance);
globalCoinFactory.register('tavaxp', TavaxP.createInstance);
globalCoinFactory.register('tbch', Tbch.createInstance);
Expand Down
2 changes: 2 additions & 0 deletions modules/bitgo/src/v2/coins/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { AbstractUtxoCoin } from '@bitgo/abstract-utxo';
export { AbstractUtxoCoin };
import { Algo, AlgoToken, Talgo } from '@bitgo/sdk-coin-algo';
export { Algo, AlgoToken, Talgo };
import { Ada, Tada } from '@bitgo/sdk-coin-ada';
export { Ada, Tada };
import { AvaxC, TavaxC, AvaxCToken } from '@bitgo/sdk-coin-avaxc';
export { AvaxC, TavaxC, AvaxCToken };
import { AvaxP, TavaxP } from '@bitgo/sdk-coin-avaxp';
Expand Down
8 changes: 8 additions & 0 deletions webpack/bitgojs.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,18 @@ module.exports = {
Buffer: ['buffer', 'Buffer'],
process: 'process/browser',
}),

new webpack.NormalModuleReplacementPlugin(/\@emurgo\/cardano-serialization-lib-nodejs/, '@emurgo/cardano-serialization-lib-browser'),

new webpack.ContextReplacementPlugin(/cardano-serialization-lib-browser/),
],
node: {
global: true,
},
experiments: {
backCompat: false,
asyncWebAssembly: true,
},
optimization: {
minimizer: [
new TerserPlugin({
Expand Down

0 comments on commit 99d141b

Please sign in to comment.