Skip to content

Commit 356c360

Browse files
committed
Include an opts option for simResult method
1 parent 95cc123 commit 356c360

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

deno.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@creit-tech/stellar-router-sdk",
3-
"version": "0.1.0",
3+
"version": "0.1.1",
44
"license": "MIT",
55
"exports": "./src/mod.ts",
66
"fmt": {

src/sdk.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ export class StellarRouterSdk {
3737
);
3838
}
3939

40-
async simResult<T>(invocations: Invocation[]): Promise<T> {
40+
async simResult<T>(invocations: Invocation[], opts?: { source?: string }): Promise<T> {
4141
if (!this.params?.rpcUrl) {
4242
throw new Error("No `rpcUrl` parameter was provided to the SDK.");
4343
}
4444

4545
const tx: Transaction = new TransactionBuilder(
46-
new Account(SIMULATION_ACCOUNT, "0"),
46+
new Account(opts?.source || SIMULATION_ACCOUNT, "0"),
4747
{ networkPassphrase: Networks.PUBLIC, fee: "0" },
4848
).setTimeout(0)
4949
.addOperation(this.exec(SIMULATION_ACCOUNT, invocations))

0 commit comments

Comments
 (0)