@@ -16,8 +16,9 @@ import {
1616 RenewRes ,
1717 isSubAccount
1818} from 'dotbit'
19- import EthersAdapter from '@gnosis.pm/safe-ethers-lib'
20- import GnosisSDK , { EthSignSignature } from '@gnosis.pm/safe-core-sdk'
19+ import EthersAdapter from '@safe-global/safe-ethers-lib'
20+ import Safe from '@safe-global/protocol-kit'
21+ import SafeSignature from '@safe-global/protocol-kit/dist/src/utils/signatures/SafeSignature'
2122import EthNftGnosisAbi from './EthNftGnosisAbi.json'
2223import EthNftAbi from './EthNftAbi.json'
2324import { ethers } from 'ethers'
@@ -161,27 +162,27 @@ export class BitPluginRegister implements BitPluginBase {
161162 const gnosisContract = new ethers . Contract ( CrossEthGnosisAddress , EthNftGnosisAbi , this . signer . signer )
162163 const nonce = ( await gnosisContract . uuidNonces ( accountIdHex ( account ) ) ) . toNumber ( )
163164
164- const gnosisSdk = await GnosisSDK . create ( {
165+ const safeSdk = await Safe . create ( {
165166 ethAdapter,
166167 safeAddress : CrossEthGnosisAddress
167168 } )
168169
169- const transaction = {
170+ const safeTransactionData = {
170171 to : CrossEthContract ,
171172 value : '0' ,
172173 nonce,
173174 data
174175 }
175176
176- const tx = await gnosisSdk . createTransaction ( transaction )
177+ const safeTransaction = await safeSdk . createTransaction ( { safeTransactionData } )
177178
178179 signatures . forEach ( ( signature ) => {
179- tx . addSignature ( new EthSignSignature ( signature . signer , signature . data ) )
180+ safeTransaction . addSignature ( new SafeSignature ( signature . signer , signature . data ) )
180181 } )
181182
182- gnosisSdk . getOwnersWhoApprovedTx = ( ) => Promise . resolve ( [ ] ) // We ignore sdk's some internal logic for now.
183+ safeSdk . getOwnersWhoApprovedTx = ( ) => Promise . resolve ( [ ] ) // We ignore sdk's some internal logic for now.
183184
184- const { hash : txHash } = await gnosisSdk . executeTransaction ( tx )
185+ const { hash : txHash } = await safeSdk . executeTransaction ( safeTransaction )
185186
186187 await this . bitBuilder . crossChainReturnTrxHashToService ( {
187188 account,
0 commit comments