You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* @param data Propose a transaction from a signer account
38
38
*/
39
39
exportasyncfunctionproposeTransaction(
40
-
safeAddress: string,
40
+
initializedMultisig: InitializedMultisig,
41
41
toAddress: string,
42
42
txData: string,
43
-
proposerPrivateKey: string,
44
-
chainId: bigint,
45
43
rpcUrl: string,
46
44
nonce: number,
47
45
value="0",
48
46
operation=OperationType.Call
49
47
){
50
-
constapiKit=newSafeApiKit({ chainId });
48
+
console.log(
49
+
`proposing transaction from \n \n @safe ${initializedMultisig.safeAddress} to ${toAddress} with value: ${value} and data: ${txData}, and nonce : ${nonce}`
50
+
);
51
51
52
52
consttxProposer=awaitSafe.init({
53
53
provider: rpcUrl,
54
-
signer: proposerPrivateKey,
55
-
safeAddress: safeAddress,
54
+
signer: initializedMultisig.wallet.privateKey,
55
+
safeAddress: initializedMultisig.safeAddress,
56
56
});
57
57
58
-
console.log(
59
-
`proposing transaction from ${txProposer} @safe ${safeAddress} to ${toAddress} with value: ${value} and data: ${txData}, and nonce : ${nonce}`
`Transaction has been proposed with hash: ${safeTxHash} from address ${txProposerAddress}`
91
-
);
92
-
returnawaitapiKit.getTransaction(safeTxHash);
74
+
if(initializedMultisig.txServiceUrl){
75
+
// For custom tx services, we have to submit our own http request since it seems like the safeApiKit.proposeTransaction method isn't compatible with some tx service urls
0 commit comments