on master help sign in
roller: replace hashTransaction with getUnsignedTx
0065b3ayosoyubik
src/lib/utils/roller.ts+4−4
@@ -69,7 +69,7 @@ export const spawn = async (
69 ship: planet, // ship to spawn
69 ship: planet, // ship to spawn
70 };
70 };
71
71
72− const hash = await api.hashTransaction(nonce, from, 'spawn', data);
72+ const hash = await api.getUnsignedTx(nonce, from, 'spawn', data);
73 const sSig = signTransactionHash(hash, _wallet.privateKey);
73 const sSig = signTransactionHash(hash, _wallet.privateKey);
74 return api.spawn(sSig, from, _wallet.address, data);
74 return api.spawn(sSig, from, _wallet.address, data);
75};
75};
@@ -107,7 +107,7 @@ export const configureKeys = async (
107 breach: breach || false,
107 breach: breach || false,
108 };
108 };
109
109
110− const hash = await api.hashTransaction(nonce, from, 'configureKeys', data);
110+ const hash = await api.getUnsignedTx(nonce, from, 'configureKeys', data);
111 const sig = signTransactionHash(hash, wallet.privateKey);
111 const sig = signTransactionHash(hash, wallet.privateKey);
112 return api.configureKeys(sig, from, wallet.address, data);
112 return api.configureKeys(sig, from, wallet.address, data);
113};
113};
@@ -130,7 +130,7 @@ export const transferPointRequest = async (
130 address,
130 address,
131 reset: reset || false,
131 reset: reset || false,
132 };
132 };
133− const hash = await api.hashTransaction(nonce, from, 'transferPoint', data);
133+ const hash = await api.getUnsignedTx(nonce, from, 'transferPoint', data);
134 const sig = signTransactionHash(hash, _wallet.privateKey);
134 const sig = signTransactionHash(hash, _wallet.privateKey);
135 return api.transferPoint(sig, from, _wallet.address, data);
135 return api.transferPoint(sig, from, _wallet.address, data);
136};
136};
@@ -182,7 +182,7 @@ export const registerProxyAddress = async (
182 proxy,
182 proxy,
183 };
183 };
184 const proxyData = { address };
184 const proxyData = { address };
185− const proxyHash = await api.hashTransaction(
185+ const proxyHash = await api.getUnsignedTx(
186 nonce,
186 nonce,
187 from,
187 from,
188 proxyType(proxyAddressType),
188 proxyType(proxyAddressType),